Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3651149
  • 博文数量: 880
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 6155
  • 用 户 组: 普通用户
  • 注册时间: 2016-11-11 09:12
个人简介

To be a better coder

文章分类

全部博文(880)

文章存档

2022年(5)

2021年(60)

2020年(175)

2019年(207)

2018年(210)

2017年(142)

2016年(81)

分类: LINUX

2019-07-24 16:07:46

[root@localhost /]#
[root@localhost /]# iptables -t nat -A PREROUTING --dst 192.168.27.230 -p tcp -i br0 --dport 9000 -j DNAT --to-destination 1.1.1.1:443
[root@localhost /]# iptables -t nat -A POSTROUTING -s 1.1.1.1 -o br0 -j SNAT --to-source 192.168.27.230
[root@localhost /]# ^C
[root@localhost /]#
[root@localhost /]#
[root@localhost /]# iptables  -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 44 packets, 2738 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DNAT       tcp  --  br0    *       0.0.0.0/0            192.168.27.230       tcp dpt:9000 to:1.1.1.1:443

Chain INPUT (policy ACCEPT 1 packets, 78 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 24 packets, 1440 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain POSTROUTING (policy ACCEPT 24 packets, 1440 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 SNAT       all  --  *      br0     1.1.1.1              0.0.0.0/0            to:192.168.27.230

Chain VETRIX_HIDE_PORTMAP (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain VETRIX_PORTMAP (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DNAT       tcp  --  br0    *       0.0.0.0/0            192.168.27.230       tcp dpt:5000 to:1.1.1.1:443

Chain VETRIX_POSTROUTING_NAT (0 references)
 pkts bytes target     prot opt in     out     source               destination         
[root@localhost /]#
[root@localhost /]#

阅读(1377) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~