Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
My linux firewall has ppp0 on a dialup to the internet and eth0 as the internal LAN, I'd like to set up rules for both ppp0 and eth1 as firewalled connections so I can run cable/dsl with dialup fallback and also set up eth0 and eth2 as internal subnets that can talk to each other (yes there are 3 NICs in there now) and also both access The Internet through the firewall.
I've read tons of firewall howtos/forums/documents and unfortunatly most of them cover ipchains while very few mention anything indepth about iptables. So my question is, does anyone have any good rules they use for iptables and/or info on how to set rules so they work with multiple internal and/or external interfaces?
my rc.firewall has this very simple ruleset currently:
echo " FWD: Allow all connections OUT and only existing and related ones IN"
/usr/sbin/iptables -A FORWARD -i ppp0 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
/usr/sbin/iptables -A FORWARD -i eth0 -o ppp0 -j ACCEPT
/usr/sbin/iptables -A FORWARD -j LOG
echo " Enabling SNAT (MASQUERADE) functionality on ppp0"
/usr/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE