Home > OS >  Consult the iptables SNAT problem
Consult the iptables SNAT problem

Time:10-18

Centos udp server, I want to by SNAT modify the udp response packet source address, but didn't reach the effect of changing the source address;
And if in the machine use udp client sends udp packets to other hosts, source address is changed.
Specific point is, did SNAT address A server will be the source address of the packet is A virtual address instead of B, I'm using C host address and contract them out to A, I hope A source address when you return to package is B is C theoretically should not receive response packet for response BaoYuan address and C the destination address is different, but in fact A source address does not change the response of the bag B, C or received A response packet,
More simple says, is that I hope is C - & gt; A, B, & gt; C, application scenario is C address through A transparent proxy through to the A, B A, received the request packet source address C, A response time, need the source address change B, C to receive properly, B is nginx,

In A subcontracted to other hosts on A voluntary basis, found that the source address is changed to B,

Seems SNAT. Useful, only to make a package for response packet was useless, I don't know whether IP connection tracking effect, do not understand,
  • Related