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

Notices

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

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


Hai....


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 :210.212.235.107 is connected to the internet
eth1 :192.168.1.222 is connected to the local network
eth2 :192.168.2.222 is connected to another network


Here 192.168.1.222 is the gateway for 192.168.1.0 network and 192.168.2.222 is the gateway for 192.168.2.0 network.These network configurations are working fine, but i want to block inter network communication ie from 192.168.1.0 network to 192.168.2.0 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
maxut
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:
Code:
iptables -F FORWARD
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i eth1 -s 192.168.1.0/24 -o eth0 -j ACCEPT
iptables -A FORWARD -i eth2 -s 192.168.2.0/24 -o eth0 -j ACCEPT
iptables -P FORWARD DROP
i hope i could understand u well.

regards
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 08:54 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration