Download your favorite Linux distribution at LQ ISO.
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-05-2010, 12:07 AM   #1
LQ Newbie
Registered: Jan 2010
Location: Ontario, Canada
Distribution: CentOS 5.5 & Ubuntu 9.10
Posts: 6

Rep: Reputation: 0
IPtables with multiple networks

Im someone new to linux and iptables, and im still trying to wrap my head around how it works.

Im trying to setup a gateway server, I am running CentOS 5.

Network Information;
eth0 – WAN/Public
eth1 - Spare (Future DMZ)
Bond0 ( – Admin Vlan, eth2 & eth3)
Bond0.2 ( – VoiceVlan, does not need internet access)
Bond0.3 ( – Public Hotspot)
Bond0.4 ( – Private Network A)
Bond0.5 ( – Private Network B)

At the moment, I can be on any network and ping ip address and see other computers.

How do I write the iptables so that each network can access the internet but that each network can’t communicate with each other?
Old 01-05-2010, 06:53 AM   #2
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
iptables -P FORWARD DROP
iptables -A FORWARD -i Bond0* -o eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o Bond0* -m state --state ESTABLISHED,RELATED -j ACCEPT
1 members found this post helpful.


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
Multiple Networks On Switch kegwell Linux - Networking 4 10-08-2011 04:33 PM
multiple wireless networks rcrummett Linux - Wireless Networking 4 09-06-2005 12:50 AM
Multiple networks bonebrain Linux - Wireless Networking 3 11-17-2004 09:38 PM
Multiple Wireless Networks - Help! simmond Linux - Wireless Networking 8 08-26-2004 03:15 AM
connecting multiple networks kierl Linux - General 2 03-14-2003 03:59 PM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:44 PM.

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