ich wollte soeben mal meinen Home-Server neu konfigurieren bzw. die Netzwerktopologie ein wenig umstellen. Dazu wollte ich den Server mit 2 NICs als Gateway hinter einem Router verwenden.
Skizze:
Internet <---> Fritzbox (interne IP: 192.168.1.1) <---> 1. NIC (192.168.1.98) SERVER 2. NIC 192.168.3.99 <---> SWITCH <---> LAN (192.168.3.0).
Habe dieses Szenario mit IP-Adressen in verschiedenen Netzen als auch im gleichen Netz (also 192.168.1.0) probiert.
Vom Client aus kann ich aber immer nur bis zur ersten NIC des Server pingen, sprich die 192.168.1.98. Vom Server kann ich aber ins Internet pingen.
Habe auf dem Server folgendes eingestellt:
Code: Alles auswählen
root@homer:/var/log# cat /proc/sys/net/ipv4/ip_forward
1
root@homer:/var/log# route -n
Kernel IP Routentabelle
Ziel Router Genmask Flags Metric Ref Use Iface
10.8.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
root@homer:/var/log# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
#allow-hotplug eth0
auto eth0
iface eth0 inet static
address 192.168.1.98
netmask 255.255.255.0
gateway 192.168.1.1
# The secondary network interface
#allow-hotplug eth0
auto eth1
iface eth1 inet static
address 192.168.3.99
netmask 255.255.255.0
gateway 192.168.1.98
root@homer:/var/log# ping www.google.de -c3
PING www.l.google.com (209.85.135.103) 56(84) bytes of data.
64 bytes from mu-in-f103.google.com (209.85.135.103): icmp_seq=1 ttl=247 time=61.5 ms
64 bytes from mu-in-f103.google.com (209.85.135.103): icmp_seq=2 ttl=247 time=62.1 ms
64 bytes from mu-in-f103.google.com (209.85.135.103): icmp_seq=3 ttl=247 time=60.9 ms
--- www.l.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 60.926/61.549/62.150/0.539 ms
Habe ich irgendwas vergessen???