iptables -t nat -A PREROUTING -d 192.168.0.194 -p tcp --dport 53 -j DNAT --to-destination 192.168.122.254:53
iptables -t nat -A POSTROUTING -d 192.168.122.254/24 -p tcp -m tcp --sport 53 -j SNAT --to-source 192.168.0.194
iptables -t filter -A INPUT -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT
网友评论