iptablse 配置DNAT转发

1
2
3
192.168.39.100 --------------> 192.168.39.33:443
||
10.10.10.10 --------------> 10.10.10.15:8443
1
2
3
iptables -t nat -A PREROUTING -d 192.168.39.33 -p tcp --dport 443 -j DNAT --to-destination 10.10.10.15:8443
iptables -t nat -A OUTPUT -d 192.168.39.33 -p tcp --dport 443 -j DNAT --to-destination 10.10.10.15:8443 # 实现本机访问
iptables -t nat -A POSTROUTING -d 10.10.10.15/32 -o eth0 -j SNAT --to-source 10.10.10.10
打赏
  • 版权声明: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!
  • Copyrights © 2018-2024 Outsrkem
  • 访问人数: | 浏览次数:

      请我喝杯咖啡吧~

      支付宝
      微信