Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Jason Price <jprice@cyberbuzz.gatech.edu>
To: netfilter@lists.netfilter.org
Subject: Netfilter and Vonage.
Date: Wed, 19 May 2004 23:37:40 -0400	[thread overview]
Message-ID: <20040519233740.A27043@redfish.gatech.edu> (raw)

Running Gentoo, kernel version 2.4.24 on a Sparc Ultra 10

I have recently purchased Vonage Voice over IP.  In their 'how to make this
work with a linksys device', they say (basically):

Forward udp ports 53, 69, 5060, 5061, and 10000-20000 to the device.

I interpret this to mean:

iptables -t nat -A PREROUTING -i eth0 -p udp -d $EXTERNAL_IP \
		--dport 53 -j DNAT --to 192.168.0.5:53

etc for each port.

Unfortunatly, I don't seem to be able to specify a range of ports in the
iptables syntax.  So, when I get to that large, 10,000 wide range of ports,
it dies.  After much tinkering, I find that I can do:

for port in {10000..10597}; do
   iptables -t nat -A PREROUTING -i eth0 -p udp -d $EXTERNAL_IP \
		--dport $port -j DNAT --to 192.168.0.5:${port}
done

and it will work.  If I do just 1 port more, iptables fails, and all the
tables get magically flushed (which isn't a good idea by the by, but we'll
get there later).

Idealy, I'd like to:

iptables -t nat -A PREROUTING -i eth0 -p udp -d $EXTERNAL_IP \
		--dport 10000-20000 -j DNAT --to 192.168.0.5:10000-20000

and call it a day.

Their table that describes this (text version of the linksys web
configuration tool.  '_' are unchecked boxes, 'X' are checked boxes):

Ext.Port		Protocol	Protocol	IP		Enable
			TCP		UDP
53 to 53		_		X		192.168.0.5	X
69 to 69		_		X		192.168.0.5	X
5060 to 5061		_		X		192.168.0.5	X
10000 to 20000		_		X		192.168.0.5	X

Any help would be greatly appreciated.

Thanks;
--Jason


             reply	other threads:[~2004-05-20  3:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-20  3:37 Jason Price [this message]
2004-05-20  5:14 ` Netfilter and Vonage John A. Sullivan III
2004-05-24 15:34   ` Jason Price
2004-05-21 11:53 ` Tomas Edwardsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040519233740.A27043@redfish.gatech.edu \
    --to=jprice@cyberbuzz.gatech.edu \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox