Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My server is Red Hat Enterprise Linux Server release 5.

iptables version is v1.3.5.

I want to allow all UDP connections / port for the IP address This IP address is configured in my eth0. So basically I want to set it up the same as my local loopback ( UDP traffic.

What is the iptable command to allow all UDP connections / ports for IP

share|improve this question
up vote 2 down vote accepted

The basic command is:

iptables -I INPUT 1 -p udp -d -j ACCEPT

This will add the rule at the beginning of the INPUT chain. You may need to specify a different chain depending on what your current rules look like though. See the iptables(8) man page for more details.

Also, the rule is for all packets going to .200. If you meant packets coming from .200 then change the -d to -s.

share|improve this answer
@Ignacio In case, if I want to set it up either way. Is it valid to execute both commands iptables -I INPUT 1 -p udp -d -j ACCEPT and iptables -I INPUT 1 -p udp -s -j ACCEPT. Or is there a single command to do this? – Gnanam Apr 12 '10 at 7:54
You shouldn't need to do both. Since this is on the INPUT chain, only one of the endpoints can be .200. If it's the local machine then use -d, otherwise use -s. – Ignacio Vazquez-Abrams Apr 12 '10 at 8:26
What does 1 after INPUT mean? – Gnanam Apr 12 '10 at 8:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.