All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomas Edwardsson <tommi@tommi.org>
To: Jason Price <jprice@cyberbuzz.gatech.edu>
Cc: netfilter@lists.netfilter.org
Subject: Re: Netfilter and Vonage.
Date: Fri, 21 May 2004 11:53:33 +0000	[thread overview]
Message-ID: <40ADEDBD.40209@tommi.org> (raw)
In-Reply-To: <20040519233740.A27043@redfish.gatech.edu>

[-- Attachment #1: Type: text/plain, Size: 1489 bytes --]

Jason Price wrote:

>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
>  
>

I suggest applying the mport patch to netfilter.
http://www.netfilter.org/patch-o-matic/pom-base.html#pom-base-mport

iptables -t nat -A PREROUTING -i eth0 -p udp -D $EXTERNAL_IP \
    --dports 53,69,5060,10000:20000 -j DNAT --to 192.168.0.5

>Thanks;
>--Jason
>  
>
====
Tomas Edwardsson
HP-UX Certified System Administrator
Red Hat Certified Engineer.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

      parent reply	other threads:[~2004-05-21 11:53 UTC|newest]

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

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=40ADEDBD.40209@tommi.org \
    --to=tommi@tommi.org \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.