LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-30-2009, 01:05 AM   #1
sajina
LQ Newbie
 
Registered: Mar 2009
Posts: 5

Rep: Reputation: 0
Unhappy iptables rules


Hai...

I have some problems in writing iptables rules .I setup ubuntu gateway server.My configurations are given below
eth0 : 192.168.1.222 is connected to the local network
eth1 : 210.212.235.107 is connected to the internet
eth2 :192.168.3.1 is connected to another network
eth3 :192.168.4.1 is connected to another network

Here I designed 192.168.1.0 network for servers. In this network, many local services are running .So other 192.168.3.0 & 192.168.4.0 network should connect to the 192.168.1.0 network and viceversa. But I dont want to connect 192.168.3.0 network to the 192.168.4.0 network and viceversa.In my configuration 192.168.1.0 network,192.168.1.222 is gateway and for 192.168.3.0 network,192.168.3.1 is gateway and for 192.168.4.0 network,192.168.4.1 is gateway.I tested all gateways and all are working fine.But problem is with the intercommunication of the networks.I dont want to communicate 192.168.3.0 to 192.168.4.0 network and viceversa.

I wrote iptables rules but it is not completely successful.I tried to block icmp protocol.

Please anyone help me to solve this problem.

Last edited by sajina; 03-30-2009 at 01:07 AM.
 
Old 03-30-2009, 01:27 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
You need to clarify your network policies. All these numbers don't help.
State your rules in terms of packets and pick reasonable variable names for your networks.

In order, you have LAN, inet, net3, net4 ... fine.

the LAN net has many servers. The server we are configuring sits between networks.

packets from net3 and net4 must be able to reach LAN (and reverse)
packets must not flow between net3 and net4
- packets from net3 addressed to net4 are dropped
- packets from net4 addressed to net3 are dropped
- packets from net3 to LAN are allowed
- packets from net4 to LAN are allowed

eth0 traffic to the internet goes to eth1.
eth2 traffic to the internet goes to eth1
eth3 traffic to the internet goes to eth1
... you can do this with port forwarding etc.

the gateway addresses are only important to hosts on the various networks.
 
Old 03-31-2009, 09:39 PM   #3
sajina
LQ Newbie
 
Registered: Mar 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Wink thanks

Sir,


Thank you for replaying to this doubt.

Regards
Sajina
 
Old 03-31-2009, 10:45 PM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
I hope this turns out useful.
I am assuming you can issue iptables commands and understand the language used in the various documents and howtos. The trick is to fit your own ideas of what needs to be done with the language of security being used by those documents and the iptables commands themselves.
Once that is done, the answer is usually pretty clear cut.

But it may not be - if you get confused anywhere, just let us know.
 
  


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
About iptables rules satimis Linux - Security 11 08-27-2007 04:50 AM
iptables 1.27a still loading rules after installing iptables 1.3.0 yawe_frek Linux - Software 1 06-07-2007 09:50 PM
Help with iptables rules rejeep Linux - Security 3 04-04-2007 05:15 AM
where are my new iptables-rules? xpucto Fedora 4 03-21-2007 07:42 AM
IPTABLES - rules in /etc/sysconfig/iptables The_JinJ Linux - Newbie 6 11-20-2004 01:40 AM


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