1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
原文:http:
//rfyiamcool
.blog.51cto.com
/1030776/1540074
Chain PREROUTING (policy ACCEPT)
target prot opt
source
destination
DOCKER all -- anywhere anywhere ADDRTYPE match dst-
type
LOCAL
Chain INPUT (policy ACCEPT)
target prot opt
source
destination
Chain OUTPUT (policy ACCEPT)
target prot opt
source
destination
DOCKER all -- anywhere !127.0.0.0
/8
ADDRTYPE match dst-
type
LOCAL
Chain POSTROUTING (policy ACCEPT)
target prot opt
source
destination
MASQUERADE all -- localhost
/16
!localhost
/16
Chain DOCKER (2 references)
target prot opt
source
destination
DNAT tcp -- anywhere anywhere tcp dpt:49153 to:172.17.0.2:22
root@dev-ops:~
#
|
1
|
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 172.31.0.23:80
|