Subject: Problem with SNAT and same port number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux