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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Problem on iptables + ipvs
    ... When I reboot with the new 2.6.17 I have some troubles. ... packets) but nothing return ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re:SOLVED network traffic scheduling
    ... I was able to achieve using HTB queueing discipline. ... to see if we can send bursts of packets at regular intervals. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: ipfw rules
    ... > send packets trough external interface rl0. ... > but cannot send any packets out from my lan box. ... I can connect to internet ... They should look like packets originating on the firewall if natd is ...
    (comp.unix.bsd.freebsd.misc)
  • RE: Default Gateway Thorough A Programme
    ... General Red Hat Linux discussion list ... > supports it) which will pass the packets to user space program which can ... > process them and, if necessary, return them back to kernel for further ... unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe ...
    (RedHat)
  • RE: 4.9-STABLE heavily dropping packets? libpcap issue?
    ... Subject: 4.9-STABLE heavily dropping packets? ... out that there are sometimes issues with the libpcap. ... This message was sent using IMP, the Internet Messaging Program. ... To unsubscribe, ...
    (freebsd-net)