[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help with iptables



On Friday 31 March 2006 22:56, Jon Miller wrote:
> I'm trying to construct a set of rules that would allow udp ports 5060,
> 7824, 49152:65535 6000:6004 to come in as well as go out.  It is my
> understanding that these packets needs to be able to have an open port both
> incoming and outgoing.  What I'm looking for is the iptables rule to allow
> these ports in.  The external interface is on eth1 and the internal (LAN)
> is on eth0.
>
> Thanks,
>
> Jon

Assumptions: 
You do NOT want state tracking.
You do NOT care what interface.
You are not too concerned about cleanliness of the traffic. (Portscans, bad 
packets etc, etc, etc.)
You are human....
You know how to read...
You know how to read the iptables man page...
I am sure there are a ton of others, but I am having troubles being funny this 
morning.

Off the top of my head...

/sbin/iptables -t filter -A INPUT -p udp --dport 5060 -j ACCEPT
/sbin/iptables -t filter -A OUTPUT -p udp --dport 5060 -j ACCEPT

/sbin/iptables -t filter -A INPUT -p udp --dport 7824 -j ACCEPT
/sbin/iptables -t filter -A OUTPUT -p udp --dport 7824 -j ACCEPT

/sbin/iptables -t filter -A INPUT -p udp --dport 49152:65535 -j ACCEPT
/sbin/iptables -t filter -A OUTPUT -p udp --dport 49152:65535 -j ACCEPT

/sbin/iptables -t filter -A INPUT -p udp --dport 6000:6004 -j ACCEPT
/sbin/iptables -t filter -A OUTPUT -p udp --dport 6000:6004 -j ACCEPT

-- 
Brian J. Schrock



Reply to: