Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iptables -t nat -L -n --line-numbers
- Chain PREROUTING (policy ACCEPT)
- num target prot opt source destination
- Chain INPUT (policy ACCEPT)
- num target prot opt source destination
- Chain OUTPUT (policy ACCEPT)
- num target prot opt source destination
- Chain POSTROUTING (policy ACCEPT)
- num target prot opt source destination
- iptables -L -n --line-numbers
- Chain INPUT (policy ACCEPT)
- num target prot opt source destination
- 1 fail2ban-dovecot tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 25,465,587,143,220,993,110,995
- 2 fail2ban-postfix tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 25,465,587
- 3 fail2ban-pure-ftpd tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 21,20,990,989
- 4 fail2ban-ssh tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 22
- 5 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
- 6 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
- 7 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
- 8 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
- 9 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:53
- 10 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:53
- 11 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:4380
- 12 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:44500
- 13 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
- 14 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:21
- 15 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:25
- 16 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:995
- 17 DROP all -- 0.0.0.0/0 0.0.0.0/0
- Chain FORWARD (policy ACCEPT)
- num target prot opt source destination
- 1 DOCKER-USER all -- 0.0.0.0/0 0.0.0.0/0
- Chain OUTPUT (policy ACCEPT)
- num target prot opt source destination
- Chain DOCKER-USER (1 references)
- num target prot opt source destination
- 1 RETURN all -- 0.0.0.0/0 0.0.0.0/0
- Chain fail2ban-dovecot (1 references)
- num target prot opt source destination
- 1 RETURN all -- 0.0.0.0/0 0.0.0.0/0
- Chain fail2ban-postfix (1 references)
- num target prot opt source destination
- 1 RETURN all -- 0.0.0.0/0 0.0.0.0/0
- Chain fail2ban-pure-ftpd (1 references)
- num target prot opt source destination
- 1 RETURN all -- 0.0.0.0/0 0.0.0.0/0
- Chain fail2ban-ssh (1 references)
- num target prot opt source destination
- 1 RETURN all -- 0.0.0.0/0 0.0.0.0/0
- docker run -it ubuntu bash
- root@efb4cb82dfcd:/# apt-get update
- Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease
- Temporary failure resolving 'archive.ubuntu.com'
- docker0 Link encap:Ethernet HWaddr 02:42:ea:1a:e0:75
- inet addr:172.17.0.1 Bcast:172.17.255.255 Mask:255.255.0.0
- iptables -t nat -A POSTROUTING -s 172.17.0.0/16 -j MASQUERADE
- docker network create mynetwork
- br-453486a78fb9 Link encap:Ethernet HWaddr 02:42:d7:bc:f2:ec
- inet addr:172.18.0.1 Bcast:172.18.255.255 Mask:255.255.0.0
- docker run -it --network mynetwork ubuntu bash
- root@f9b09c211afa:/# apt-get update
- Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease
- Temporary failure resolving 'archive.ubuntu.com'
- iptables -t nat -A POSTROUTING -s 172.18.0.0/16 -j MASQUERADE
Add Comment
Please, Sign In to add comment