Help answer threads with 0 replies.
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 04-07-2003, 04:35 AM   #1
Registered: Mar 2003
Location: PARIS / FRANCE
Distribution: Mandrake 9.2rc2
Posts: 49

Rep: Reputation: 15
Iptables rules priority


I would like to block many ports on my linux machine but i have a rule that accept connexions which have been established by computers from my subnet.

For exemple, if i would like to block the port 139 and a computer of my network area try to connect to internet through this port, is the connexion accepted by the linux server ???

Old 04-19-2003, 12:50 AM   #2
Registered: Apr 2002
Location: Melbourne, Australia
Distribution: Gentoo
Posts: 273

Rep: Reputation: 30
I assume you mean that your cuurent setup allows for connections based on the state, that is that if a local machine has initiated the connection them you will accept the responce, but in this case you want to specifically block all connections to port 139.

Assuming this is what you are trying to do all you need to do is put a rule in to block this port, before the rule that checks the state. The iptables rules are handeled in order, if the conditions of rule number 1 are not met then it goes to rule number 2, if they are not met is goes to rule number 3 and so on until it gets to the bottom of all the rules. If it has not made a match at this stage them it does whatever is specified in the policy for that chain.


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
IPTABLES - rules in /etc/sysconfig/iptables The_JinJ Linux - Newbie 6 11-20-2004 02:40 AM
Snort rules> priority linuxtommy Linux - Security 1 09-12-2004 10:35 PM
iptables ssh priority? Emanon Linux - Networking 2 04-15-2004 03:22 AM
use iptables to give net traffic priority to web browsers ? qwijibow Linux - Security 2 02-17-2004 09:10 AM
iptables: packet priority LiquidKernel Linux - Networking 1 04-23-2003 08:58 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:25 AM.

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