LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 04-07-2003, 03:35 AM   #1
exalik
Member
 
Registered: Mar 2003
Location: PARIS / FRANCE
Distribution: Mandrake 9.2rc2
Posts: 49

Rep: Reputation: 15
Iptables rules priority


Hello,

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 ???


Exalik
 
Old 04-18-2003, 11:50 PM   #2
Sutekh
Member
 
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.
 
  


Reply



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 01:40 AM
Snort rules> priority linuxtommy Linux - Security 1 09-12-2004 09:35 PM
iptables ssh priority? Emanon Linux - Networking 2 04-15-2004 02:22 AM
use iptables to give net traffic priority to web browsers ? qwijibow Linux - Security 2 02-17-2004 08:10 AM
iptables: packet priority LiquidKernel Linux - Networking 1 04-23-2003 07:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:32 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