iptables

扫码查看
[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 /]#

10-01 13:14
查看更多