ik krijg het niet voor elkaar, de 2 gateways werken perfect, kan van buiten af pingen.
maar vanaf intern blijft toch alles over eth1 gaan. even wat info, wie kan me helpen, ik draai redhat 9 met iptables.
eth0 = netwerk 192.168.0.???
eth1 = internet 212.238.232.53 (Demon Adsl) via dhcp
eth2 = internet 217.121.27.145 (@Home) via static ip
[root@www5 /]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
217.121.26.0 0.0.0.0 255.255.254.0 U 0 0 0 eth2
212.238.232.0 0.0.0.0 255.255.252.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 212.238.232.1 0.0.0.0 UG 0 0 0 eth1
[root@www5 etc]# iptables -t nat -v --list
Chain PREROUTING (policy ACCEPT 122 packets, 7194 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 25 packets, 1752 bytes)
pkts bytes target prot opt in out source destination
0 0 SNAT all -- any eth2 192.168.0.2 anywhere to:217.121.27.145
83 4653 SNAT all -- any eth1 192.168.0.0/24 anywhere to:212.238.232.53
Chain OUTPUT (policy ACCEPT 24 packets, 1704 bytes)
pkts bytes target prot opt in out source destination
[root@www5 /]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:75:D9:38:DB
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32623 errors:0 dropped:0 overruns:1 frame:0
TX packets:38938 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:3084268 (2.9 Mb) TX bytes:37425898 (35.6 Mb)
Interrupt:11 Base address:0xd800
eth1 Link encap:Ethernet HWaddr 00:C0:26:AB:2C:9A
inet addr:212.238.232.53 Bcast:212.238.235.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15905 errors:0 dropped:0 overruns:0 frame:0
TX packets:26702 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:15685116 (14.9 Mb) TX bytes:2247812 (2.1 Mb)
Interrupt:11 Base address:0x6000
eth2 Link encap:Ethernet HWaddr 00:C0:26:AB:2E:AC
inet addr:217.121.27.145 Bcast:217.121.27.255 Mask:255.255.254.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22620 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:19485469 (18.5 Mb) TX bytes:240 (240.0 b)
Interrupt:5 Base address:0x8000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
maar vanaf intern blijft toch alles over eth1 gaan. even wat info, wie kan me helpen, ik draai redhat 9 met iptables.
eth0 = netwerk 192.168.0.???
eth1 = internet 212.238.232.53 (Demon Adsl) via dhcp
eth2 = internet 217.121.27.145 (@Home) via static ip
[root@www5 /]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
217.121.26.0 0.0.0.0 255.255.254.0 U 0 0 0 eth2
212.238.232.0 0.0.0.0 255.255.252.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 212.238.232.1 0.0.0.0 UG 0 0 0 eth1
[root@www5 etc]# iptables -t nat -v --list
Chain PREROUTING (policy ACCEPT 122 packets, 7194 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 25 packets, 1752 bytes)
pkts bytes target prot opt in out source destination
0 0 SNAT all -- any eth2 192.168.0.2 anywhere to:217.121.27.145
83 4653 SNAT all -- any eth1 192.168.0.0/24 anywhere to:212.238.232.53
Chain OUTPUT (policy ACCEPT 24 packets, 1704 bytes)
pkts bytes target prot opt in out source destination
[root@www5 /]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:75:D9:38:DB
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32623 errors:0 dropped:0 overruns:1 frame:0
TX packets:38938 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:3084268 (2.9 Mb) TX bytes:37425898 (35.6 Mb)
Interrupt:11 Base address:0xd800
eth1 Link encap:Ethernet HWaddr 00:C0:26:AB:2C:9A
inet addr:212.238.232.53 Bcast:212.238.235.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15905 errors:0 dropped:0 overruns:0 frame:0
TX packets:26702 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:15685116 (14.9 Mb) TX bytes:2247812 (2.1 Mb)
Interrupt:11 Base address:0x6000
eth2 Link encap:Ethernet HWaddr 00:C0:26:AB:2E:AC
inet addr:217.121.27.145 Bcast:217.121.27.255 Mask:255.255.254.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22620 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:19485469 (18.5 Mb) TX bytes:240 (240.0 b)
Interrupt:5 Base address:0x8000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)