From: "Barry A Rich" <barich@trisectrix.com>
To: netfilter@vger.kernel.org
Subject: UDP packets not being SNAT-ed
Date: Wed, 30 Jul 2008 21:58:36 -0400 [thread overview]
Message-ID: <00bb01c8f2b0$f2875360$d795fa20$@com> (raw)
I've configured an ubuntu PC as a router. All TCP based protocols are
working. The UDP packets are not getting SNAT-ed. Can someone help with the
setup?
The relevant iptables setup is:
$IPTABLES -A OUTPUT -o lo -s $UNIVERSE -d $UNIVERSE -j ACCEPT
$IPTABLES -t nat -A POSTROUTING -o $UPLINK1IF -j SNAT --to $UPLINK1IP
$IPTABLES -t nat -A POSTROUTING -o $UPLINK2IF -j SNAT --to $UPLINK2IP
$IPTABLES -t nat -A POSTROUTING -o $UPLINK3IF -j SNAT --to $UPLINK3IP
The routing setup is:
ip route add $UPLINK1NET dev $UPLINK1IF src $UPLINK1IP table uplink1
ip route add default via $UPLINK1GW table uplink1
ip route add $UPLINK2NET dev $UPLINK2IF src $UPLINK2IP table uplink2
ip route add default via $UPLINK2GW table uplink2
ip route add $UPLINK3NET dev $UPLINK3IF src $UPLINK3IP table uplink3
ip route add default via $UPLINK2GW table uplink3
ip route add default scope global \
nexthop via $UPLINK1GW dev $UPLINK1IF weight 1 \
nexthop via $UPLINK2GW dev $UPLINK2IF weight 1 \
nexthop via $UPLINK3GW dev $UPLINK3IF weight 1
reply other threads:[~2008-07-31 1:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='00bb01c8f2b0$f2875360$d795fa20$@com' \
--to=barich@trisectrix.com \
--cc=netfilter@vger.kernel.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.