Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 03-26-2009, 12:15 AM   #1
LQ Newbie
Registered: Mar 2009
Posts: 5

Rep: Reputation: 0
Unhappy ubuntu gateway server for connecting different networks


Please help anyone for solving this problem, because i am a beginner in administration.

I have setup an ubuntu gateway server by using four NIC cards.

eth0 : is connected to the internet
eth1 : is connected to the local network
eth2 : is connected to another network

Here is the gateway for network and is the gateway for network.These network configurations are working fine, but i want to block inter network communication ie from network to network,i want to block the communication for securing the local networks more.I know iptable rule is enough for this purpose .But i cant find the apt rule for this purpose.If anybody knows the rule for blocking the inter network communication ,please give me a reply.
Old 03-26-2009, 03:38 AM   #2
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
if u want to allow internet connection only (the communication between local networks will be dropped by iptables), u can try following rules:
iptables -F FORWARD
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i eth1 -s -o eth0 -j ACCEPT
iptables -A FORWARD -i eth2 -s -o eth0 -j ACCEPT
iptables -P FORWARD DROP
i hope i could understand u well.



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
connecting two different (sub)networks yivi Linux - Networking 10 03-25-2009 11:49 PM
connecting ubuntu to a windows 2003 server clinux_new Linux - Networking 2 08-07-2008 10:00 AM
Connecting Fedora to a Ubuntu Samba server harisund Linux - Networking 1 08-01-2006 05:44 AM
Connecting to MS networks Nay_Nay Linux - Networking 4 01-29-2006 11:07 AM
connecting two networks sfichera Linux - Networking 1 03-26-2005 08:54 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:36 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration