Guest User

Untitled

a guest
Jan 17th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.61 KB | None | 0 0
  1. iptables -t nat -L -n --line-numbers
  2. Chain PREROUTING (policy ACCEPT)
  3. num target prot opt source destination
  4.  
  5. Chain INPUT (policy ACCEPT)
  6. num target prot opt source destination
  7.  
  8. Chain OUTPUT (policy ACCEPT)
  9. num target prot opt source destination
  10.  
  11. Chain POSTROUTING (policy ACCEPT)
  12. num target prot opt source destination
  13.  
  14. iptables -L -n --line-numbers
  15. Chain INPUT (policy ACCEPT)
  16. num target prot opt source destination
  17. 1 fail2ban-dovecot tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 25,465,587,143,220,993,110,995
  18. 2 fail2ban-postfix tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 25,465,587
  19. 3 fail2ban-pure-ftpd tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 21,20,990,989
  20. 4 fail2ban-ssh tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 22
  21. 5 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
  22. 6 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
  23. 7 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
  24. 8 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
  25. 9 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:53
  26. 10 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:53
  27. 11 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:4380
  28. 12 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:44500
  29. 13 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
  30. 14 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:21
  31. 15 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:25
  32. 16 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:995
  33. 17 DROP all -- 0.0.0.0/0 0.0.0.0/0
  34.  
  35. Chain FORWARD (policy ACCEPT)
  36. num target prot opt source destination
  37. 1 DOCKER-USER all -- 0.0.0.0/0 0.0.0.0/0
  38.  
  39. Chain OUTPUT (policy ACCEPT)
  40. num target prot opt source destination
  41.  
  42. Chain DOCKER-USER (1 references)
  43. num target prot opt source destination
  44. 1 RETURN all -- 0.0.0.0/0 0.0.0.0/0
  45.  
  46. Chain fail2ban-dovecot (1 references)
  47. num target prot opt source destination
  48. 1 RETURN all -- 0.0.0.0/0 0.0.0.0/0
  49.  
  50. Chain fail2ban-postfix (1 references)
  51. num target prot opt source destination
  52. 1 RETURN all -- 0.0.0.0/0 0.0.0.0/0
  53.  
  54. Chain fail2ban-pure-ftpd (1 references)
  55. num target prot opt source destination
  56. 1 RETURN all -- 0.0.0.0/0 0.0.0.0/0
  57.  
  58. Chain fail2ban-ssh (1 references)
  59. num target prot opt source destination
  60. 1 RETURN all -- 0.0.0.0/0 0.0.0.0/0
  61.  
  62. docker run -it ubuntu bash
  63. root@efb4cb82dfcd:/# apt-get update
  64. Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease
  65. Temporary failure resolving 'archive.ubuntu.com'
  66.  
  67. docker0 Link encap:Ethernet HWaddr 02:42:ea:1a:e0:75
  68. inet addr:172.17.0.1 Bcast:172.17.255.255 Mask:255.255.0.0
  69.  
  70. iptables -t nat -A POSTROUTING -s 172.17.0.0/16 -j MASQUERADE
  71.  
  72. docker network create mynetwork
  73.  
  74. br-453486a78fb9 Link encap:Ethernet HWaddr 02:42:d7:bc:f2:ec
  75. inet addr:172.18.0.1 Bcast:172.18.255.255 Mask:255.255.0.0
  76.  
  77. docker run -it --network mynetwork ubuntu bash
  78. root@f9b09c211afa:/# apt-get update
  79. Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease
  80. Temporary failure resolving 'archive.ubuntu.com'
  81.  
  82. iptables -t nat -A POSTROUTING -s 172.18.0.0/16 -j MASQUERADE
Add Comment
Please, Sign In to add comment