[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: multiple nic/IP in firewall




On Tue, Jan 22, 2013 at 7:54 PM, Roberto Scattini <roberto.scattini@gmail.com> wrote:
hi list,

i have a problem, we have a webserver behind a firewall. the firewall had one public IP address and was working fine. today i added a second nic to the firewall, with a different public IP address. and i want to use both public addresses to access the webserver.
i did read larct howto for this case (http://www.lartc.org/lartc.html#AEN267) and made an script with it, but it is not working as expected. all response packets to requests to nic with second ip 
P2_NET=XX.220.XX.176
IF2=eth3
IP2=XX.220.XX.178
P2=XX.220.XX.177

ip route add $P1_NET dev $IF1 src $IP1 table T1
ip route add default via $P1 table T1
ip route add $P2_NET dev $IF2 src $IP2 table T2
ip route add default via $P2 table T2

ip route add $P1_NET dev $IF1 src $IP1
ip route add $P2_NET dev $IF2 src $IP2

ip route add default via $P2

ip rule add from $IP1 table T1
ip rule add from $IP2 table T2


1. the second interface, in on same subnet as the first interface....?
2. the gateway for second interface is different as the first interface....?


--
"La Voluntad es el único motor de nuestros logros"
http://ngen.com.ar/blog


Reply to: