Welcome to Server Circle. It's a friendly site and all levels of experience are welcome. Be aware that we use cookies for your login.
Server Circle - Ask questions about Servers and get answers from experts.
Beta (0.81 sec)
IPtables for UDP and not TCP

I copied this rule off someone for TCP SSH connections:



iptables -A INPUT -p tcp --sport 1024:65535 --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT

iptables -A OUTPUT -p tcp --sport 22 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT

iptables -A OUTPUT -p tcp --sport 1024:65535 --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT

iptables -A INPUT -p tcp --sport 22 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT


Here it is in Pastie if it helps: http://pastie.org/2007433

It seems okay but let me know if I've made any mistakes.

I know I can't use ESTABLISHED for UDP connections but if I want to open up a port, say UDP port 12345, what other options can I give to be safer ? Can RELATED be used for example ?

Help would be great !
Asked by:
Ladyboots
210 points
 Report Abuse
 Share Page - Category: Server Firewalls - Tags: IPtables for UDP and not TCP
 Enter your response
Please use Pastie.org to paste lengthy code or to fix formatting issues with code
  • Responses in reverse (0)



  • Related Questions
About Us : Contact Us : Etiquette : Terms : CDN Failover : ShorterURL : CDN Fallback : © 2013 Server Circle