* Subject: Problem with SNAT and same port number
[not found] <20040223052721.8508.52386.Mailman@netfilter-sponsored-by.noris.net>
@ 2004-02-23 6:10 ` prabha
2004-02-23 6:21 ` netfilter
0 siblings, 1 reply; 2+ messages in thread
From: prabha @ 2004-02-23 6:10 UTC (permalink / raw)
To: netfilter
Hi
>I am wanting to change the source address of outgoing packets that have a src
>port of 53.
> I have tried /sbin/iptables -A POSTROUTING -p tcp -t nat -o bond0 --sport 53
>-j SNAT --to-source 192.168.0.1:53
If my understanding is correct, you want to do SNAT but without changing the
source port number. The above command should work.
Can you check out if your DNS requests are on TCP or UDP? If they are on UDP,
you may need to extend the above rule for UDP also.
Regards
Prabha
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Subject: Problem with SNAT and same port number
2004-02-23 6:10 ` Subject: Problem with SNAT and same port number prabha
@ 2004-02-23 6:21 ` netfilter
0 siblings, 0 replies; 2+ messages in thread
From: netfilter @ 2004-02-23 6:21 UTC (permalink / raw)
To: prabha, netfilter
Hi,
Yes, I do include udp as well. A tcpdump shows traffic two and from until I
insert that rule, then there is no return traffic sent, its as though its
being silently dropped, because nothing is in the logs either. If I change
the port to 52, the return traffic apears, but of course, on the wrong port.
> Hi
>
> >I am wanting to change the source address of outgoing packets that have a
> > src port of 53.
> > I have tried /sbin/iptables -A POSTROUTING -p tcp -t nat -o bond0 --sport
> > 53 -j SNAT --to-source 192.168.0.1:53
>
> If my understanding is correct, you want to do SNAT but without changing
> the source port number. The above command should work.
> Can you check out if your DNS requests are on TCP or UDP? If they are on
> UDP, you may need to extend the above rule for UDP also.
>
> Regards
> Prabha
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-23 6:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20040223052721.8508.52386.Mailman@netfilter-sponsored-by.noris.net>
2004-02-23 6:10 ` Subject: Problem with SNAT and same port number prabha
2004-02-23 6:21 ` netfilter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox