All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Taylor, Grant" <gtaylor@riverviewtech.net>
To: Doug C <the_wasp@game-nation.net.nz>
Cc: netfilter@lists.netfilter.org
Subject: Re: Remapping of starcraft UDP port 6112
Date: Tue, 19 Apr 2005 14:23:50 -0500	[thread overview]
Message-ID: <42655AC6.9080007@riverviewtech.net> (raw)
In-Reply-To: <001001c544af$d2bd15e0$3800a8c0@Dewasp>

> ADSL=$(/sbin/ifconfig hsb0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'|sed -n 1p)
> 
> iptables -A PREROUTING -t nat -j DNAT -p udp -d $ADSL --dport 63001 --to-destination 192.168.0.3:6112
> iptables -A POSTROUTING -t nat -j SNAT -p udp -s $ADSL --sport 6112 --to-source 192.168.0.3:63001
> 
> iptables -A PREROUTING -t nat -j DNAT -p udp -d $ADSL --dport 63002 --to-destination 192.168.0.56:6112
> iptables -A POSTROUTING -t nat -j SNAT -p udp -s $ADSL --sport 6112 --to-source 192.168.0.56:63002

Doug, it looks like you might be using the wrong source IP to SNAT your traffic to in your POSTROUTING chain.  I would use the following rules and see if they work.

iptables -t nat -A PREROUTING -p udp -d $ADSL --dport 63001 -j DNAT --to-destination 192.168.0.3:6112
iptables -t nat -A POSTROUTING -p udp -s 192.168.0.3 --sport 6112 -j SNAT --to-source $ADSL:63001

iptables -t nat -A PREROUTING -p udp -d $ADSL --dport 63002 -j DNAT --to-destination 192.168.0.56:6112
iptables -t nat -A POSTROUTING -p udp -s 192.168.0.56 --sport 6112 -j SNAT --to-source $ADSL:63002

It looks like you had your IPs backwards in your POSTROUTING rules.  However I'm a bit perplexed that your regular SNATing rules did not take care of this.  You may also need to explicitly allow traffic for these connections in your FORWARD chain if you have set the default policy to DROP.



Grant. . . .


  parent reply	other threads:[~2005-04-19 19:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-19  6:58 Remapping of starcraft UDP port 6112 Doug C
2005-04-19 14:24 ` Sebastian Docktor
2005-04-19 19:23 ` Taylor, Grant [this message]
2005-04-20  7:39   ` Doug C
2005-04-20 16:23     ` Taylor, Grant
     [not found]       ` <000601c54639$89ff0940$3800a8c0@Dewasp>
     [not found]         ` <42674EFD.90803@riverviewtech.net>
     [not found]           ` <000601c546d4$b32848e0$3800a8c0@Dewasp>
2005-04-22  4:31             ` Taylor Grant

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=42655AC6.9080007@riverviewtech.net \
    --to=gtaylor@riverviewtech.net \
    --cc=netfilter@lists.netfilter.org \
    --cc=the_wasp@game-nation.net.nz \
    /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.