Guest User

Untitled

a guest
Aug 29th, 2014
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.71 KB | None | 0 0
  1. ############
  2. +---------------------------+ INTERNET +--------------------------+
  3. | #####+###### |
  4. | | +-------+-------+
  5. | | | 9.10.11.12 |
  6. | | ++---------------++
  7. | | | DSL Modem Router|
  8. | | +--------+--------+
  9. | | |
  10. +---+---+ +---+---+ +---+---+
  11. | eth0 | | eth0 | | LAN |
  12. +---+-------+---+ +---+-------+---+ +---+-------+---+
  13. | 5.6.7.8 | | 1.2.3.4 | | 10.0.2.15 |
  14. +--+---------------+--+ +--+---------------+--+ +--+---------------+--+
  15. | Linux | | Linux | | Windows |
  16. | OpenVPN | | OpenVPN | | OpenVPN |
  17. | Client | | Server | | Client |
  18. +--+---------------+--+ +--+---------------+--+ +--+---------------+--+
  19. | 10.8.0.200 | | 10.8.0.1 | | 10.8.0.2 |
  20. +---+-------+---+ +---+-------+---+ +---+-------+---+
  21. | tun1 | | tun0 | |tun/tap|
  22. +---+---+ +---+---+ +---+---+
  23. | | |
  24. +--------------------------------+--------------------------------+
  25.  
  26. Kernel IP routing table
  27. Destination Gateway Genmask Flags Metric Ref Use Iface
  28. default 1.2.3.1 0.0.0.0 UG 0 0 0 eth0
  29. 10.8.0.0 * 255.255.255.0 U 0 0 0 tun0
  30. 1.2.3.0 * 255.255.254.0 U 0 0 0 eth0
  31.  
  32. Kernel IP routing table
  33. Destination Gateway Genmask Flags Metric Ref Use Iface
  34. default 5.6.7.1 0.0.0.0 UG 0 0 0 eth0
  35. 10.8.0.0 * 255.255.255.0 U 0 0 0 tun1
  36. 5.6.7.0 * 255.255.254.0 U 0 0 0 eth0
  37.  
  38. IPv4 Route Table
  39. ===========================================================================
  40. Active Routes:
  41. Network Destination Netmask Gateway Interface Metric
  42. 0.0.0.0 0.0.0.0 10.0.2.2 10.0.2.15 266
  43. 0.0.0.0 128.0.0.0 10.8.0.200 10.8.0.2 20
  44. 10.0.2.0 255.255.255.0 On-link 10.0.2.15 266
  45. 10.0.2.15 255.255.255.255 On-link 10.0.2.15 266
  46. 10.0.2.255 255.255.255.255 On-link 10.0.2.15 266
  47. 10.8.0.0 255.255.255.0 On-link 10.8.0.2 276
  48. 10.8.0.2 255.255.255.255 On-link 10.8.0.2 276
  49. 10.8.0.255 255.255.255.255 On-link 10.8.0.2 276
  50. 107.191.51.248 255.255.255.255 10.0.2.2 10.0.2.15 10
  51. 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
  52. 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
  53. 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
  54. 128.0.0.0 128.0.0.0 10.8.0.200 10.8.0.2 20
  55. 224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
  56. 224.0.0.0 240.0.0.0 On-link 10.0.2.15 266
  57. 224.0.0.0 240.0.0.0 On-link 10.8.0.2 276
  58. 255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
  59. 255.255.255.255 255.255.255.255 On-link 10.0.2.15 266
  60. 255.255.255.255 255.255.255.255 On-link 10.8.0.2 276
  61. ===========================================================================
  62.  
  63. mode server
  64. tls-server
  65. topology subnet
  66. push "topology subnet"
  67.  
  68. dev tun0
  69. local 1.2.3.4
  70. port 1194
  71. proto udp
  72.  
  73. client-to-client
  74. max-clients 200
  75.  
  76. ca ca.crt
  77. cert server.crt
  78. key server.key
  79. dh dh2048.pem
  80. tls-auth ta.key 0
  81.  
  82. ifconfig 10.8.0.1 255.255.255.0
  83. ifconfig-pool 10.8.0.2 10.8.0.199 255.255.255.0
  84. client-config-dir /etc/openvpn/clients
  85.  
  86. keepalive 10 60
  87.  
  88. comp-lzo yes
  89. push "comp-lzo yes"
  90.  
  91. user nobody
  92. group nogroup
  93.  
  94. persist-key
  95. persist-tun
  96.  
  97. status status.log
  98. verb 3
  99. mute 20
  100.  
  101. ifconfig-push 10.8.0.200 255.255.255.0
  102.  
  103. push "route-gateway 10.8.0.200"
  104. push "redirect-gateway def1"
  105.  
  106. remote 1.2.3.4 1194
  107. client
  108.  
  109. dev tun1
  110.  
  111. ca ca.crt
  112. cert linclient.crt
  113. key linclient.key
  114. tls-auth ta.key 1
  115.  
  116. remote-cert-tls server
  117.  
  118. comp-lzo
  119.  
  120. user nobody
  121. group nogroup
  122.  
  123. persist-key
  124. persist-tun
  125.  
  126. status status.log
  127. verb 3
  128. mute 20
  129.  
  130. remote 1.2.3.4 1194
  131. client
  132.  
  133. dev tun
  134.  
  135. ca ca.crt
  136. cert winclient.crt
  137. key winclient.key
  138. tls-auth ta.key 1
  139.  
  140. remote-cert-tls server
  141.  
  142. comp-lzo
  143.  
  144. user nobody
  145. group nogroup
  146.  
  147. persist-key
  148. persist-tun
  149.  
  150. status status.log
  151. verb 3
  152. mute 20
  153.  
  154. Pinging 10.8.0.1 with 32 bytes of data:
  155. Reply from 10.8.0.1: bytes=32 time=119ms TTL=64
  156. Reply from 10.8.0.1: bytes=32 time=120ms TTL=64
  157. Reply from 10.8.0.1: bytes=32 time=120ms TTL=64
  158. Reply from 10.8.0.1: bytes=32 time=119ms TTL=64
  159.  
  160. Ping statistics for 10.8.0.1:
  161. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
  162. Approximate round trip times in milli-seconds:
  163. Minimum = 119ms, Maximum = 120ms, Average = 119ms
  164.  
  165. [email protected]:/# tcpdump -i tun0
  166. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  167. listening on tun0, link-type RAW (Raw IP), capture size 65535 bytes
  168. 16:46:12.316295 IP 10.8.0.2 > 10.8.0.1: ICMP echo request, id 1, seq 3930, length 40
  169. 16:46:12.316316 IP 10.8.0.1 > 10.8.0.2: ICMP echo reply, id 1, seq 3930, length 40
  170. 16:46:13.333982 IP 10.8.0.2 > 10.8.0.1: ICMP echo request, id 1, seq 3931, length 40
  171. 16:46:13.333994 IP 10.8.0.1 > 10.8.0.2: ICMP echo reply, id 1, seq 3931, length 40
  172. 16:46:14.344666 IP 10.8.0.2 > 10.8.0.1: ICMP echo request, id 1, seq 3932, length 40
  173. 16:46:14.344678 IP 10.8.0.1 > 10.8.0.2: ICMP echo reply, id 1, seq 3932, length 40
  174. 16:46:15.356811 IP 10.8.0.2 > 10.8.0.1: ICMP echo request, id 1, seq 3933, length 40
  175. 16:46:15.356824 IP 10.8.0.1 > 10.8.0.2: ICMP echo reply, id 1, seq 3933, length 40
  176.  
  177. Pinging 10.8.0.200 with 32 bytes of data:
  178. Reply from 10.8.0.200: bytes=32 time=226ms TTL=64
  179. Reply from 10.8.0.200: bytes=32 time=226ms TTL=64
  180. Reply from 10.8.0.200: bytes=32 time=225ms TTL=64
  181. Reply from 10.8.0.200: bytes=32 time=225ms TTL=64
  182.  
  183. Ping statistics for 10.8.0.200:
  184. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
  185. Approximate round trip times in milli-seconds:
  186. Minimum = 225ms, Maximum = 226ms, Average = 225ms
  187.  
  188. [email protected]:~# tcpdump -i tun1
  189. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  190. listening on tun1, link-type RAW (Raw IP), capture size 65535 bytes
  191. 18:48:13.694836 IP 10.8.0.2 > 10.8.0.200: ICMP echo request, id 1, seq 3934, length 40
  192. 18:48:13.694862 IP 10.8.0.200 > 10.8.0.2: ICMP echo reply, id 1, seq 3934, length 40
  193. 18:48:14.706081 IP 10.8.0.2 > 10.8.0.200: ICMP echo request, id 1, seq 3935, length 40
  194. 18:48:14.706093 IP 10.8.0.200 > 10.8.0.2: ICMP echo reply, id 1, seq 3935, length 40
  195. 18:48:15.722542 IP 10.8.0.2 > 10.8.0.200: ICMP echo request, id 1, seq 3936, length 40
  196. 18:48:15.722555 IP 10.8.0.200 > 10.8.0.2: ICMP echo reply, id 1, seq 3936, length 40
  197. 18:48:16.732037 IP 10.8.0.2 > 10.8.0.200: ICMP echo request, id 1, seq 3937, length 40
  198. 18:48:16.732049 IP 10.8.0.200 > 10.8.0.2: ICMP echo reply, id 1, seq 3937, length 40
  199.  
  200. C:Windowssystem32>ping 8.8.8.8
  201.  
  202. Pinging 8.8.8.8 with 32 bytes of data:
  203. Request timed out.
  204. Request timed out.
  205. Request timed out.
  206.  
  207. Ping statistics for 8.8.8.8:
  208. Packets: Sent = 3, Received = 0, Lost = 3 (100% loss),
  209. Control-C
  210. ^C
  211.  
  212. [email protected]:/# tcpdump -i tun0
  213. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  214. listening on tun0, link-type RAW (Raw IP), capture size 65535 bytes
  215. 16:49:55.077094 IP 10.8.0.2 > google-public-dns-a.google.com: ICMP echo request, id 1, seq 3938, length 40
  216. 16:49:59.844689 IP 10.8.0.2 > google-public-dns-a.google.com: ICMP echo request, id 1, seq 3939, length 40
  217. 16:50:04.896020 IP 10.8.0.2 > google-public-dns-a.google.com: ICMP echo request, id 1, seq 3940, length 40
  218. 16:50:09.938695 IP 10.8.0.2 > google-public-dns-a.google.com: ICMP echo request, id 1, seq 3941, length 40
  219.  
  220. [email protected]:~# tcpdump -i tun1
  221. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  222. listening on tun1, link-type RAW (Raw IP), capture size 65535 bytes
  223. ^C
  224. 0 packets captured
  225. 0 packets received by filter
  226. 0 packets dropped by kernel
  227.  
  228. [email protected]:~# cat /proc/sys/net/ipv4/ip_forward
  229. 1
  230.  
  231. [email protected]:~# iptables -L -n -v
  232. Chain INPUT (policy ACCEPT 1752 packets, 142K bytes)
  233. pkts bytes target prot opt in out source destination
  234.  
  235. Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
  236. pkts bytes target prot opt in out source destination
  237.  
  238. Chain OUTPUT (policy ACCEPT 1496 packets, 184K bytes)
  239. pkts bytes target prot opt in out source destination
  240.  
  241. [email protected]:~# iptables -t nat -L -n -v
  242. Chain PREROUTING (policy ACCEPT 7 packets, 1603 bytes)
  243. pkts bytes target prot opt in out source destination
  244.  
  245. Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
  246. pkts bytes target prot opt in out source destination
  247.  
  248. Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
  249. pkts bytes target prot opt in out source destination
  250.  
  251. Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
  252. pkts bytes target prot opt in out source destination
  253. 0 0 MASQUERADE all -- * eth0 0.0.0.0/0 0.0.0.0/0
  254.  
  255. C:Windowssystem32>tracert 10.8.0.1
  256.  
  257. Tracing route to 10.8.0.1 over a maximum of 30 hops
  258.  
  259. 1 119 ms 119 ms 120 ms 10.8.0.1
  260.  
  261. Trace complete.
  262.  
  263. C:Windowssystem32>tracert 10.8.0.200
  264.  
  265. Tracing route to 10.8.0.200 over a maximum of 30 hops
  266.  
  267. 1 226 ms 226 ms 225 ms 10.8.0.200
  268.  
  269. Trace complete.
  270.  
  271. C:Windowssystem32>tracert 8.8.8.8
  272.  
  273. Tracing route to 8.8.8.8 over a maximum of 30 hops
  274.  
  275. 1 119 ms 119 ms 119 ms 10.8.0.1
  276. 2 * * * Request timed out.
  277. 3 * * * Request timed out.
  278. 4 ^C
Advertisement
Add Comment
Please, Sign In to add comment