Re: Packet disappears after DNAT?

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

 



Scott Bronson a écrit :
> 
> Good question.  Editing mistake.  I'm actually forwarding different
> ports to different guests depending on port number:
> 
> iptables -t nat -A POSTROUTING -s 192.168.122.10/32 -d
> 192.168.122.10/32 -p udp --dport 53 -j MASQUERADE
> iptables -t nat -A POSTROUTING -s 192.168.122.10/32 -d
> 192.168.122.10/32 -p tcp --dport 53 -j MASQUERADE
> iptables -t nat -A POSTROUTING -s 192.168.122.12/32 -d
> 192.168.122.12/32 -p tcp --dport 25 -j MASQUERADE

I don't think you need a separate rule for each forwarded port. One
global rule would do the job, as only forwarded packets would match the
source/destination address.


iptables -t nat -A POSTROUTING -s 192.168.122.10/32 -d 192.168.122.10/32
  -j MASQUERADE
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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