iproute2 rules and iptables NAT... what is the difference?
Posted
by Jakobud
on Server Fault
See other posts from Server Fault
or by Jakobud
Published on 2010-04-22T22:01:13Z
Indexed on
2010/04/22
22:03 UTC
Read the original article
Hit count: 557
We have 2 different ISP connections. Our previous "IT guy" setup our firewall like so:
When /etc/rc.local
was executed on startup, it did a bunch of ip rule add
and ip route add
commands in order to route certain internal hosts to use certain ISP connections.
Then at the end of /etc/rc.local
, he executed our iptables
firewall rules that were generated by Firewall Builder
. These iptables
rules have both Policy and NAT rules setup in them.
What I don't understand, is why did he use iproute2
to specify rules and routes but also specify NAT rules for iptables
? Why didn't he just do it all in one or the other instead of using them both? Could he have got rid of the iproute2
rules and routes and just put all those same rules into the iptables
NAT settings?
© Server Fault or respective owner