Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.53 KB | None | 0 0
  1. iptables -L -n -t nat
  2. Chain PREROUTING (policy ACCEPT)
  3. target prot opt source destination
  4. DOCKER-INGRESS all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL
  5. DOCKER all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL
  6.  
  7. Chain INPUT (policy ACCEPT)
  8. target prot opt source destination
  9.  
  10. Chain OUTPUT (policy ACCEPT)
  11. target prot opt source destination
  12. DOCKER-INGRESS all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL
  13. DOCKER all -- 0.0.0.0/0 !127.0.0.0/8 ADDRTYPE match dst-type LOCAL
  14.  
  15. Chain POSTROUTING (policy ACCEPT)
  16. target prot opt source destination
  17. MASQUERADE all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match src-type LOCAL
  18. MASQUERADE all -- 172.17.0.0/16 0.0.0.0/0
  19. MASQUERADE all -- 172.18.0.0/16 0.0.0.0/0
  20.  
  21. Chain DOCKER (2 references)
  22. target prot opt source destination
  23. RETURN all -- 0.0.0.0/0 0.0.0.0/0
  24. RETURN all -- 0.0.0.0/0 0.0.0.0/0
  25.  
  26. Chain DOCKER-INGRESS (2 references)
  27. target prot opt source destination
  28. DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:30000 to:172.18.0.2:30000
  29. DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5001 to:172.18.0.2:5001
  30. DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080 to:172.18.0.2:8080
  31. DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5000 to:172.18.0.2:5000
  32.  
  33.  
  34. netstat -ntlp
  35. Active Internet connections (only servers)
  36. Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
  37. tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 925/sshd
  38. tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1059/master
  39. tcp6 0 0 :::5000 :::* LISTEN 909/dockerd
  40. tcp6 0 0 :::5001 :::* LISTEN 909/dockerd
  41. tcp6 0 0 :::2377 :::* LISTEN 909/dockerd
  42. tcp6 0 0 :::7946 :::* LISTEN 909/dockerd
  43. tcp6 0 0 :::30000 :::* LISTEN 909/dockerd
  44. tcp6 0 0 :::8080 :::* LISTEN 909/dockerd
  45. tcp6 0 0 :::22 :::* LISTEN 925/sshd
  46. tcp6 0 0 ::1:25 :::* LISTEN 1059/master
  47.  
  48.  
  49. From Inside the VM:
  50. curl -I http://10.255.7.207:5000/
  51. HTTP/1.1 200 OK
  52. From antoher VM on the same LAN:
  53. curl -vv http://10.255.7.207:5000/
  54. * connect to 10.255.7.207 port 5000 failed: Connection timed out
  55.  
  56. TCPDUMP
  57. tcpdump -vvnn dst port 5000
  58. tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
  59.  
  60. 17:19:58.879100 IP (tos 0x0, ttl 64, id 38305, offset 0, flags [DF], proto TCP (6), length 60)
  61. 10.255.7.163.36942 > 10.255.7.207.5000: Flags [S], cksum 0x8245 (correct), seq 2448172036, win 29200, options [mss 1460,sackOK,TS val 583971237 ecr 0,nop,wscale 7], length 0
  62. 17:19:59.877583 IP (tos 0x0, ttl 64, id 38306, offset 0, flags [DF], proto TCP (6), length 60)
  63.  
  64.  
  65. docker version
  66. Client:
  67. Version: 18.06.1-ce
  68. API version: 1.38
  69. Go version: go1.10.3
  70. Git commit: e68fc7a
  71. Built: Tue Aug 21 17:24:56 2018
  72. OS/Arch: linux/amd64
  73. Experimental: false
  74.  
  75. Server:
  76. Engine:
  77. Version: 18.06.1-ce
  78. API version: 1.38 (minimum version 1.12)
  79. Go version: go1.10.3
  80. Git commit: e68fc7a
  81. Built: Tue Aug 21 17:23:21 2018
  82. OS/Arch: linux/amd64
  83. Experimental: false
  84.  
  85.  
  86. docker info
  87. Containers: 10
  88. Running: 7
  89. Paused: 0
  90. Stopped: 3
  91. Images: 11
  92. Server Version: 18.06.1-ce
  93. Storage Driver: overlay2
  94. Backing Filesystem: extfs
  95. Supports d_type: true
  96. Native Overlay Diff: true
  97. Logging Driver: json-file
  98. Cgroup Driver: cgroupfs
  99. Plugins:
  100. Volume: local
  101. Network: bridge host macvlan null overlay
  102. Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
  103. Swarm: active
  104. NodeID: t20zhzx4xlsii3zjig3guheq5
  105. Is Manager: true
  106. ClusterID: 8l5eobl9t7f4rjwy5y4ry3rh2
  107. Managers: 1
  108. Nodes: 2
  109. Orchestration:
  110. Task History Retention Limit: 5
  111. Raft:
  112. Snapshot Interval: 10000
  113. Number of Old Snapshots to Retain: 0
  114. Heartbeat Tick: 1
  115. Election Tick: 10
  116. Dispatcher:
  117. Heartbeat Period: 5 seconds
  118. CA Configuration:
  119. Expiry Duration: 3 months
  120. Force Rotate: 0
  121. Autolock Managers: false
  122. Root Rotation In Progress: false
  123. Node Address: 172.31.0.207
  124. Manager Addresses:
  125. 172.31.0.207:2377
  126. Runtimes: runc
  127. Default Runtime: runc
  128. Init Binary: docker-init
  129. containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
  130. runc version: 69663f0bd4b60df09991c08812a60108003fa340
  131. init version: fec3683
  132. Security Options:
  133. apparmor
  134. seccomp
  135. Profile: default
  136. Kernel Version: 4.4.0-53-generic
  137. Operating System: Ubuntu 16.04.5 LTS
  138. OSType: linux
  139. Architecture: x86_64
  140. CPUs: 1
  141. Total Memory: 992.4MiB
  142. Name: iitwebuge019
  143. ID: FZ3W:ZRN2:ZSRO:CUST:BU5T:GAUB:DGNP:C5SR:HOXI:52UZ:G6DH:OSGX
  144. Docker Root Dir: /var/lib/docker
  145. Debug Mode (client): false
  146. Debug Mode (server): false
  147. Registry: https://index.docker.io/v1/
  148. Labels:
  149. Experimental: false
  150. Insecure Registries:
  151. 127.0.0.0/8
  152. Live Restore Enabled: false
  153.  
  154. WARNING: No swap limit support
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement