Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 01-23-2003, 12:39 PM   #1
Senior Member
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
iptables rules

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
Old 01-23-2003, 04:32 PM   #2
Senior Member
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
There are enough variables in your request to keep us busy for a while, so, the definitive iptables tutorial is here.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
IPTABLES - rules in /etc/sysconfig/iptables The_JinJ Linux - Newbie 6 11-20-2004 01:40 AM
iptables rules Fatz Linux - Security 1 08-05-2004 06:04 AM
iptables rules chrisfirestar Linux - Security 2 10-29-2003 02:30 AM
IPTables rules dkny01 Linux - Networking 6 10-23-2003 12:52 AM
iptables rules hazza96 Linux - Security 3 09-09-2001 11:16 AM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration