Re: Forcing source port with NAT

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

 



On Mon, Jun 23, 2003 at 03:02PM -0500, Jason White wrote:
[...]
>Basically, I need to ensure that anything coming in on 200.200.200.200:2104
>goes to 10.0.0.2:2104 and anything going out from 10.0.0.2:2104 goes out
>200.200.200.200:2104.
[...]

  Answering my own post, the following worked:

iptables -t nat -A POSTROUTING -p udp -s 10.0.0.2 --sport 2104 -j SNAT
  --to 200.200.200.200:2104

-- 
Jason White (jdw-netfilter@xxxxxxxxxxx)  http://www.jdwhite.org/~jdwhite
Jabber:jdwhite@xxxxxxxxxx  IRC:irc.netbsd.org/{jdwhite,jdw}
AIM:jdwhite90125  Yahoo:jdwhite89  ICQ:9295078  MSN:jdwhite89@xxxxxxxxxxx
GPG KeyID: 0x74CF850D/1F57 465A 1357 BA39 2BEF  5629 6E1C 2B20 74CF 850D


[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