From: "Doug C" <the_wasp@game-nation.net.nz>
To: "Taylor, Grant" <gtaylor@riverviewtech.net>
Cc: netfilter@lists.netfilter.org
Subject: Re: Remapping of starcraft UDP port 6112
Date: Wed, 20 Apr 2005 19:39:25 +1200 [thread overview]
Message-ID: <000901c5457c$14e461e0$3800a8c0@Dewasp> (raw)
In-Reply-To: 42655AC6.9080007@riverviewtech.net
cheers for spoting that the rules were backwards, i think i must have
stuffed them up when putting them into the email.
is it actually possible for iptables/netfilter to redirect the packets the
way i want it to?
if it is possible i dont see why it shouldnt work because as i said in the
first question warcraft can use any port it pleases therefor the protocol
must be able to handle it
----- Original Message -----
From: "Taylor, Grant" <gtaylor@riverviewtech.net>
To: "Doug C" <the_wasp@game-nation.net.nz>
Cc: <netfilter@lists.netfilter.org>
Sent: Wednesday, April 20, 2005 7:23 AM
Subject: Re: Remapping of starcraft UDP port 6112
> > 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. . . .
>
>
next prev parent reply other threads:[~2005-04-20 7:39 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
2005-04-20 7:39 ` Doug C [this message]
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='000901c5457c$14e461e0$3800a8c0@Dewasp' \
--to=the_wasp@game-nation.net.nz \
--cc=gtaylor@riverviewtech.net \
--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.