LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   iptables - -syn (https://www.linuxquestions.org/questions/linux-security-4/iptables-syn-506597/)

yawe_frek 12-01-2006 12:04 PM

iptables - -syn
 
hi guys ,

I am writing my rc.packetfilter scripts, and i was wondering if i needed any rules like these there.

iptables -A INPUT -p tcp --syn -i eth0 --dport 23 -j ACCEPT.(what will a rules like this do)

The problem i am having now is that i seem not to understand fully waht the syn does. pls i need more clarification on how this is use and basiclly what is does.

Thanks

musicman_ace 12-02-2006 04:56 AM

First off, DO NOT use telnet.

But that rule would be explained like this:
Code:

Append a rule for incoming (Traffic coming to this server)
When they are TCP syn packets
on eth0
destined for port 23
Accept them.

You may want to limit rate those, because I could syn flood you and you would be victim of a DoS. Use port 22 which is secure shell.

Mara 12-02-2006 03:26 PM

SYN packet is the first one that comes when a connection is established (well...at the time of syn there's no connection yet). If you want to allow a connection to a specific port, you need to allow such packets pass. There's no need to use --syn if you already allow --state NEW.


All times are GMT -5. The time now is 05:33 PM.