multiple default gateways
Hi,
I'm trying to setup my network with multiple default gateways from a debian linux box running 2.6.11.10. I've read lartc.org/howto/lartc.rpdb.multiple-links.html and understand about setting up the routes for each interface in separate routing tables. I have added the table names into my rp_tables file and ip route show table demon/ rednet shows that there's nothing in those tables. However when I try an add a route into the tables it accepts my command, Code:
ip route add 213.246.137.16/30 dev eth3 src 213.246.137.18 table rednet I'm quite obviously missing something, but can't work out what it is. Do I need to comple something extra into the kernel? Can anyone please shed any light on the situation? Thanks :confused: |
hi,
i'm quite in a hurry... so i wont be long. I think you've got to compile the advanced routing module in your kernel. but it's strange you don't have any error message... good luck |
#marking the packets in the input interface in this case eth0
iptables -t mangle -A PREROUTING -i eth0 -s 62.1.196.116/32 -j MARK --set-mark 6 #Masquerade the outgoing interface with the input one iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE #sending the marked packets with number 4 into the talbe 80.out ip ru add fwmark 4 table 80.out #making default gw 10.0.1.138 for table 80.out ip ro add default table 80.out via 10.0.1.138 |
simply use shorewall firewall.
Shorewall and Multiple Internet Connections eth3 connects to ISP1. The IP address of eth3 is 172.16.6.50 and the ISP's gateway router has IP address 172.16.6.49 eth0 connects to ISP 2. The IP address of eth0 is 192.192.192.15 and the ISP's gateway router has IP address 192.192.192.10. eth1 connects to the local LAN(192.168.0.1). 1: Edit /etc/shorewall/providers file Entries in /etc/shorewall/providers can specify that outgoing connections are to be load-balanced between the two ISPs. ############################################################################## #NAME NUMBER MARK DUPLICATE INTERFACE GATEWAY OPTIONS ISP1 1 1 main eth3 172.16.6.49 track,balance ISP2 2 2 main eth0 192.192.192.10 track, balance #LAST LINE -- ADD YOUR ENTRIES ABOVE THIS LINE -- DO NOT REMOVE 2: Edit the interfaces file /etc/shorewall/interfaces ############################################################################## #ZONE INTERFACE BROADCAST OPTIONS GATEWAY # loc eth1 net eth0 detect net eth3 detect #LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE 4:Edit your policy file(Add the following line): /etc/shorewall/policy #SOURCE DESTINATION POLICY LIMIT:BURST net net DROP 5:Edit the masq file /etc/shorewall/masq: #INTERFACE SUBNET ADDRESS eth0 172.16.6.50 192.192.192.15 eth3 192.192.192.10 172.16.6.50 6:I want to masquerade my eth1 (local zone) for this I will add the following in my masq file:- #INTERFACE SUBNET ADDRESS eth0 eth1 192.192.192.10 eth3 eth1 172.16.6.50 best regards |
All times are GMT -5. The time now is 01:39 AM. |