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

Notices


Reply
  Search this Thread
Old 01-05-2010, 12:07 AM   #1
hall-2k
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 (10.0.0.1 – Admin Vlan, eth2 & eth3)
Bond0.2 (192.168.55.10 – VoiceVlan, does not need internet access)
Bond0.3 (10.0.1.1 – Public Hotspot)
Bond0.4 (10.0.2.1 – Private Network A)
Bond0.5 (10.0.3.1 – 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
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
Code:
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.
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:36 PM.

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