From: Jason Price <jprice@cyberbuzz.gatech.edu>
To: netfilter@lists.netfilter.org
Subject: Re: Netfilter and Vonage.
Date: Mon, 24 May 2004 11:34:54 -0400 [thread overview]
Message-ID: <20040524113454.A16387@redfish.gatech.edu> (raw)
In-Reply-To: <1085030073.19632.8.camel@localhost>; from john.sullivan@nexusmgmt.com on Thu, May 20, 2004 at 01:14:34AM -0400
On Thu, May 20, 2004 at 01:14:34AM -0400, John A. Sullivan III wrote:
> iptables -t nat -A PREROUTING -i eth0 -p 17 -d $EXTERNAL_IP --dport
> 10000:20000 -j DNAT --to-destination 192.168.0.5:10000-20000
This turned the trick. For the record (and those who look for this in the
future) here's what I did to make it all work:
Thanks!
Jason
######################################################################
#!/bin/bash
# NOTES:
# 1) This assumes that eth0 will be the external interface
# 2) We also assume that this is a DHCP assigned external IP.
# 3) Assume that DHCPD will assign Vonage the 192.168.0.5.
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
# Get current details:
EXTERNAL_IP=`ifconfig eth0 | grep "inet addr:" | awk '{print $2}' | \
cut -f 2 -d :`
VONAGE_IP=192.168.0.5
##############
# Vonage stuff
iptables -t nat -A PREROUTING -i eth0 -p udp -d $EXTERNAL_IP \
--dport 53 -j DNAT --to ${VONAGE_IP}:53
iptables -t nat -A PREROUTING -i eth0 -p udp -d $EXTERNAL_IP \
--dport 69 -j DNAT --to ${VONAGE_IP}:69
iptables -t nat -A PREROUTING -i eth0 -p udp -d $EXTERNAL_IP \
--dport 5060:5061 -j DNAT \
--to-destination ${VONAGE_IP}:5060-5061
iptables -t nat -A PREROUTING -i eth0 -p udp -d $EXTERNAL_IP \
--dport 10000:20000 -j DNAT \
--to-destination ${VONAGE_IP}:10000-20000
##############
next prev parent reply other threads:[~2004-05-24 15:34 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 [this message]
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=20040524113454.A16387@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