Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.66 KB | None | 0 0
  1. #Update Raspbian
  2. sudo apt-get update -y
  3. sudo apt-get dist-upgrade -y
  4. sudo reboot
  5.  
  6. sudo apt install dnsmasq hostapd -y
  7.  
  8. sudo nano /etc/dhcpcd.conf
  9. #Added following after # Example static IP configuration:
  10. interface wlan0
  11. static ip_address=192.168.4.1/24
  12. nohook wpa_supplicant
  13.  
  14. sudo systemctl restart dhcpcd
  15.  
  16. sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
  17. sudo nano /etc/dnsmasq.conf
  18. #Added following
  19. interface=wlan0 # Use the require wireless interface - usually wlan0
  20. dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h
  21.  
  22. sudo systemctl reload dnsmasq
  23.  
  24. sudo nano /etc/hostapd/hostapd.conf
  25.  
  26. interface=wlan0
  27. driver=nl80211
  28. ssid=MyWiFi
  29. hw_mode=g
  30. channel=7
  31. wmm_enabled=0
  32. macaddr_acl=0
  33. auth_algs=1
  34. ignore_broadcast_ssid=0
  35. wpa=2
  36. wpa_passphrase=AccessMyNetwork
  37. wpa_key_mgmt=WPA-PSK
  38. wpa_pairwise=TKIP
  39. rsn_pairwise=CCMP
  40.  
  41. sudo nano /etc/default/hostapd
  42. #Added following line
  43. DAEMON_CONF="/etc/hostapd/hostapd.conf"
  44.  
  45. sudo systemctl unmask hostapd
  46. sudo systemctl enable hostapd
  47. sudo systemctl start hostapd
  48.  
  49. sudo nano /etc/sysctl.conf
  50. #Added
  51. net.ipv4.ip_forward=1
  52.  
  53. sudo apt install hostapd bridge-utils -y
  54.  
  55. sudo nano /etc/dhcpcd.conf
  56. #Added following lines just before interface wlan0 config I added above
  57. denyinterfaces wlan0
  58. denyinterfaces eth0
  59.  
  60. sudo nano /etc/network/interfaces
  61. # Added following after source-directory
  62. # Bridge setup
  63. auto br0
  64. iface br0 inet manual
  65. bridge_ports eth0 wlan0
  66.  
  67. sudo ifup br0
  68. sudo systemctl restart dhcpcd
  69.  
  70. sudo nano /etc/hostapd/hostapd.conf
  71. #Added bridge=br0 below the interface=wlan0 line and comment out the driver line
  72. bridge=br0
  73. #driver=nl80211
  74.  
  75. sudo systemctl unmask hostapd
  76. sudo systemctl enable hostapd
  77. sudo systemctl start hostapd
  78.  
  79. sudo reboot
  80.  
  81. pi@accesspoint:~ $ ifconfig
  82. br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  83. inet 10.24.11.15 netmask 255.255.255.0 broadcast 10.24.11.255
  84. inet6 fe80::4152:f5f5:5bee:6082 prefixlen 64 scopeid 0x20<link>
  85. ether b8:27:eb:8e:38:ee txqueuelen 1000 (Ethernet)
  86. RX packets 92 bytes 10655 (10.4 KiB)
  87. RX errors 0 dropped 3 overruns 0 frame 0
  88. TX packets 75 bytes 10841 (10.5 KiB)
  89. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  90.  
  91. eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  92. ether b8:27:eb:db:6d:bb txqueuelen 1000 (Ethernet)
  93. RX packets 64 bytes 8284 (8.0 KiB)
  94. RX errors 0 dropped 1 overruns 0 frame 0
  95. TX packets 102 bytes 14518 (14.1 KiB)
  96. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  97.  
  98. lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
  99. inet 127.0.0.1 netmask 255.0.0.0
  100. inet6 ::1 prefixlen 128 scopeid 0x10<host>
  101. loop txqueuelen 1000 (Local Loopback)
  102. RX packets 0 bytes 0 (0.0 B)
  103. RX errors 0 dropped 0 overruns 0 frame 0
  104. TX packets 0 bytes 0 (0.0 B)
  105. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  106.  
  107. wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  108. ether b8:27:eb:8e:38:ee txqueuelen 1000 (Ethernet)
  109. RX packets 29 bytes 3519 (3.4 KiB)
  110. RX errors 0 dropped 0 overruns 0 frame 0
  111. TX packets 38 bytes 6341 (6.1 KiB)
  112. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  113.  
  114. sudo apt-get install openvpn -y
  115.  
  116. sudo cp /etc/openvpn/client1.ovpn /etc/openvpn/client.conf
  117.  
  118. sudo systemctl start openvpn@client
  119.  
  120. pi@accesspoint:~ $ ifconfig
  121. br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  122. inet 10.24.11.15 netmask 255.255.255.0 broadcast 10.24.11.255
  123. inet6 fe80::4152:f5f5:5bee:6082 prefixlen 64 scopeid 0x20<link>
  124. ether b8:27:eb:8e:38:ee txqueuelen 1000 (Ethernet)
  125. RX packets 2355 bytes 1999824 (1.9 MiB)
  126. RX errors 0 dropped 108 overruns 0 frame 0
  127. TX packets 894 bytes 108321 (105.7 KiB)
  128. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  129.  
  130. eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  131. ether b8:27:eb:db:6d:bb txqueuelen 1000 (Ethernet)
  132. RX packets 4094 bytes 2863772 (2.7 MiB)
  133. RX errors 0 dropped 18 overruns 0 frame 0
  134. TX packets 3289 bytes 660002 (644.5 KiB)
  135. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  136.  
  137. lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
  138. inet 127.0.0.1 netmask 255.0.0.0
  139. inet6 ::1 prefixlen 128 scopeid 0x10<host>
  140. loop txqueuelen 1000 (Local Loopback)
  141. RX packets 16 bytes 1631 (1.5 KiB)
  142. RX errors 0 dropped 0 overruns 0 frame 0
  143. TX packets 16 bytes 1631 (1.5 KiB)
  144. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  145.  
  146. tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
  147. inet 10.8.0.2 netmask 255.255.255.0 destination 10.8.0.2
  148. inet6 fe80::48dd:8f8b:8dcd:a059 prefixlen 64 scopeid 0x20<link>
  149. unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
  150. RX packets 1 bytes 76 (76.0 B)
  151. RX errors 0 dropped 0 overruns 0 frame 0
  152. TX packets 95 bytes 5492 (5.3 KiB)
  153. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  154.  
  155. wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  156. ether b8:27:eb:8e:38:ee txqueuelen 1000 (Ethernet)
  157. RX packets 2600 bytes 546612 (533.8 KiB)
  158. RX errors 0 dropped 0 overruns 0 frame 0
  159. TX packets 2446 bytes 1014039 (990.2 KiB)
  160. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  161.  
  162.  
  163. pi@accesspoint:~ $ sudo ip route
  164. 0.0.0.0/1 via 10.8.0.1 dev tun0
  165. default via 10.24.11.1 dev br0 src 10.24.11.15 metric 204
  166. 10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.2
  167. 10.24.11.0/24 dev br0 proto kernel scope link src 10.24.11.15 metric 204
  168. 35.166.225.161 via 10.24.11.1 dev br0
  169. 128.0.0.0/1 via 10.8.0.1 dev tun0
  170.  
  171. pi@accesspoint:~ $ sudo route -n
  172. Kernel IP routing table
  173. Destination Gateway Genmask Flags Metric Ref Use Iface
  174. 0.0.0.0 10.8.0.1 128.0.0.0 UG 0 0 0 tun0
  175. 0.0.0.0 10.24.11.1 0.0.0.0 UG 204 0 0 br0
  176. 10.8.0.0 0.0.0.0 255.255.255.0 U 0 0 0 tun0
  177. 10.24.11.0 0.0.0.0 255.255.255.0 U 204 0 0 br0
  178. 35.166.225.161 10.24.11.1 255.255.255.255 UGH 0 0 0 br0
  179. 128.0.0.0 10.8.0.1 128.0.0.0 UG 0 0 0 tun0
  180.  
  181. pi@accesspoint:~ $ ping 10.2.2.101
  182. PING 10.2.2.101 (10.2.2.101) 56(84) bytes of data.
  183. 64 bytes from 10.2.2.101: icmp_seq=1 ttl=64 time=81.2 ms
  184.  
  185. pi@accesspoint:~ $ ping 10.2.1.145
  186. PING 10.2.1.145 (10.2.1.145) 56(84) bytes of data.
  187. 64 bytes from 10.2.1.145: icmp_seq=1 ttl=63 time=80.5 ms
  188.  
  189. pi@accesspoint:~ $ ping 10.8.0.1
  190. PING 10.8.0.1 (10.8.0.1) 56(84) bytes of data.
  191. 64 bytes from 10.8.0.1: icmp_seq=1 ttl=64 time=80.1 ms
  192.  
  193. pi@accesspoint:~ $ ping 10.8.0.2
  194. PING 10.8.0.2 (10.8.0.2) 56(84) bytes of data.
  195. 64 bytes from 10.8.0.2: icmp_seq=1 ttl=64 time=0.171 ms
  196.  
  197. sudo iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
  198.  
  199. pi@accesspoint:~ $ ping -I 10.8.0.2 10.2.1.145
  200. PING 10.2.1.145 (10.2.1.145) from 10.8.0.2 : 56(84) bytes of data.
  201. 64 bytes from 10.2.1.145: icmp_seq=1 ttl=63 time=80.9 ms
  202.  
  203. pi@accesspoint:~ $ ping -I 10.24.11.15 10.2.1.145
  204. (0 received, 100% packet loss)
  205.  
  206. pi@accesspoint:~ $ sudo iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
  207. pi@accesspoint:~ $ sudo sudo iptables -A FORWARD -i tun0 -o br0 -j ACCEPT
  208. pi@accesspoint:~ $ sudo iptables -A FORWARD -i br0 -o tun0 -j ACCEPT
  209.  
  210. pi@accesspoint:~ $ ping 10.2.1.145
  211. PING 10.2.1.145 (10.2.1.145) 56(84) bytes of data.
  212. 64 bytes from 10.2.1.145: icmp_seq=1 ttl=63 time=82.5 ms
  213.  
  214. pi@accesspoint:~ $ ping -I 10.24.11.15 10.2.1.145
  215. PING 10.2.1.145 (10.2.1.145) from 10.24.11.15 : 56(84) bytes of data.
  216. 64 bytes from 10.2.1.145: icmp_seq=1 ttl=63 time=82.5 ms
  217.  
  218. pi@accesspoint:~ $ sudo ip route get 10.2.1.145 from 10.8.0.2 iif br0
  219. RTNETLINK answers: Invalid argument
  220.  
  221. pi@accesspoint:~ $ sudo ip route get 10.2.1.145 from 10.8.0.2 iif tun0
  222. RTNETLINK answers: Invalid argument
  223.  
  224. pi@accesspoint:~ $ sudo ip route get 10.2.1.145 from 10.24.11.15 iif br0
  225. RTNETLINK answers: Invalid argument
  226.  
  227. pi@accesspoint:~ $ sudo ip route get 10.2.1.145 from 10.24.11.15 iif tun0
  228. RTNETLINK answers: Invalid argument
  229.  
  230. pi@accesspoint:~ $ sudo ip netconf show dev tun0
  231. ipv4 dev tun0 forwarding on rp_filter off mc_forwarding off proxy_neigh off ignore_routes_with_linkdown off
  232.  
  233. pi@accesspoint:~ $ sudo ip netconf show dev br0
  234. ipv4 dev br0 forwarding on rp_filter off mc_forwarding off proxy_neigh off ignore_routes_with_linkdown off
  235.  
  236. pi@client:~ $ ifconfig
  237. eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
  238. ether b8:27:eb:d2:02:8c txqueuelen 1000 (Ethernet)
  239. RX packets 0 bytes 0 (0.0 B)
  240. RX errors 0 dropped 0 overruns 0 frame 0
  241. TX packets 0 bytes 0 (0.0 B)
  242. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  243.  
  244. lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
  245. inet 127.0.0.1 netmask 255.0.0.0
  246. inet6 ::1 prefixlen 128 scopeid 0x10<host>
  247. loop txqueuelen 1000 (Local Loopback)
  248. RX packets 73 bytes 6692 (6.5 KiB)
  249. RX errors 0 dropped 0 overruns 0 frame 0
  250. TX packets 73 bytes 6692 (6.5 KiB)
  251. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  252.  
  253. wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  254. inet 10.24.11.201 netmask 255.255.255.0 broadcast 10.24.11.255
  255. inet6 fe80::561a:a6ae:7d08:1470 prefixlen 64 scopeid 0x20<link>
  256. ether b8:27:eb:87:57:d9 txqueuelen 1000 (Ethernet)
  257. RX packets 7277 bytes 792141 (773.5 KiB)
  258. RX errors 0 dropped 0 overruns 0 frame 0
  259. TX packets 28592 bytes 3117200 (2.9 MiB)
  260. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  261.  
  262. pi@client:~ $ sudo ip route
  263. default via 10.24.11.1 dev wlan0 src 10.24.11.201 metric 303
  264. 10.24.11.0/24 dev wlan0 proto kernel scope link src 10.24.11.201 metric 303
  265.  
  266. pi@client:~ $ sudo route -n
  267. Kernel IP routing table
  268. Destination Gateway Genmask Flags Metric Ref Use Iface
  269. 0.0.0.0 10.24.11.1 0.0.0.0 UG 303 0 0 wlan0
  270. 10.24.11.0 0.0.0.0 255.255.255.0 U 303 0 0 wlan0
  271.  
  272. pi@client:~ $ ping 10.24.11.15
  273. PING 10.24.11.15 (10.24.11.15) 56(84) bytes of data.
  274. 64 bytes from 10.24.11.15: icmp_seq=1 ttl=64 time=2.31 ms
  275.  
  276. pi@client:~ $ ping 10.2.1.145
  277. PING 10.2.1.145 (10.2.1.145) 56(84) bytes of data
  278. (0 received, 100% packet loss)
  279.  
  280. pi@client:~ $ ping 10.8.0.2
  281. PING 10.8.0.2 (10.8.0.2) 56(84) bytes of data.
  282. (0 received, 100% packet loss)
  283.  
  284. pi@accesspoint:~ $ sudo ip route add 10.2.0.0/16 via 10.8.0.2 dev tun0 proto static
  285.  
  286. pi@accesspoint:~ $ sudo ip route
  287. 0.0.0.0/1 via 10.8.0.1 dev tun0
  288. default via 10.24.11.1 dev br0 src 10.24.11.15 metric 204
  289. 10.2.0.0/16 via 10.8.0.2 dev tun0 proto static
  290. 10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.2
  291. 10.24.11.0/24 dev br0 proto kernel scope link src 10.24.11.15 metric 204
  292. 35.166.225.161 via 10.24.11.1 dev br0
  293. 128.0.0.0/1 via 10.8.0.1 dev tun0
  294.  
  295. pi@accesspoint:~ $ sudo route -n
  296. Kernel IP routing table
  297. Destination Gateway Genmask Flags Metric Ref Use Iface
  298. 0.0.0.0 10.8.0.1 128.0.0.0 UG 0 0 0 tun0
  299. 0.0.0.0 10.24.11.1 0.0.0.0 UG 204 0 0 br0
  300. 10.2.0.0 10.8.0.2 255.255.0.0 UG 0 0 0 tun0
  301. 10.8.0.0 0.0.0.0 255.255.255.0 U 0 0 0 tun0
  302. 10.24.11.0 0.0.0.0 255.255.255.0 U 204 0 0 br0
  303. 35.166.225.161 10.24.11.1 255.255.255.255 UGH 0 0 0 br0
  304. 128.0.0.0 10.8.0.1 128.0.0.0 UG 0 0 0 tun0
  305.  
  306. ubuntu@openvpn:~$ sudo route -n
  307. Kernel IP routing table
  308. Destination Gateway Genmask Flags Metric Ref Use Iface
  309. 0.0.0.0 10.2.2.1 0.0.0.0 UG 100 0 0 ens5
  310. 10.2.2.0 0.0.0.0 255.255.255.0 U 0 0 0 ens5
  311. 10.2.2.1 0.0.0.0 255.255.255.255 UH 100 0 0 ens5
  312. 10.8.0.0 0.0.0.0 255.255.255.0 U 0 0 0 tun0
  313.  
  314. ubuntu@openvpn:~$ sudo ip route add 10.24.11.0/24 via 10.8.0.1 dev tun0 proto static
  315.  
  316. ubuntu@openvpn:~$ sudo route -n
  317. Kernel IP routing table
  318. Destination Gateway Genmask Flags Metric Ref Use Iface
  319. 0.0.0.0 10.2.2.1 0.0.0.0 UG 100 0 0 ens5
  320. 10.2.2.0 0.0.0.0 255.255.255.0 U 0 0 0 ens5
  321. 10.2.2.1 0.0.0.0 255.255.255.255 UH 100 0 0 ens5
  322. 10.8.0.0 0.0.0.0 255.255.255.0 U 0 0 0 tun0
  323. 10.24.11.0 10.8.0.1 255.255.255.0 UG 0 0 0 tun0
  324.  
  325. ubuntu@openvpn:~$ ping 10.8.0.2
  326. PING 10.8.0.2 (10.8.0.2) 56(84) bytes of data.
  327. 64 bytes from 10.8.0.2: icmp_seq=1 ttl=64 time=80.0 ms
  328.  
  329. ubuntu@openvpn:~$ ping 10.24.11.15
  330. PING 10.24.11.15 (10.24.11.15) 56(84) bytes of data.
  331. (0 received, 100% packet loss)
  332.  
  333. pi@client:~ $ ping 10.8.0.2
  334. PING 10.8.0.2 (10.8.0.2) 56(84) bytes of data.
  335. ^C
  336. --- 10.8.0.2 ping statistics ---
  337. 12 packets transmitted, 0 received, 100% packet loss, time 11416ms
  338.  
  339. pi@accesspoint:~ $ sudo tcpdump -ni br0 'icmp'
  340. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  341. listening on br0, link-type EN10MB (Ethernet), capture size 262144 bytes
  342. 11:22:23.054146 IP 10.24.11.201 > 10.8.0.2: ICMP echo request, id 2619, seq 1, length 64
  343. 11:22:24.084698 IP 10.24.11.201 > 10.8.0.2: ICMP echo request, id 2619, seq 2, length 64
  344. 11:22:25.126055 IP 10.24.11.201 > 10.8.0.2: ICMP echo request, id 2619, seq 3, length 64
  345.  
  346. pi@accesspoint:~ $ sudo tcpdump -ni tun0 'icmp'
  347. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  348. listening on tun0, link-type RAW (Raw IP), capture size 262144 bytes
  349. ^C
  350. (0 packets captured)
  351.  
  352. pi@client:~ $ ping 10.2.1.145
  353. PING 10.2.1.145 (10.2.1.145) 56(84) bytes of data.
  354. ^C
  355. --- 10.2.1.145 ping statistics ---
  356. 17 packets transmitted, 0 received, 100% packet loss, time 16644ms
  357.  
  358. pi@accesspoint:~ $ sudo tcpdump -ni br0 'icmp'
  359. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  360. listening on br0, link-type EN10MB (Ethernet), capture size 262144 bytes
  361. 11:24:27.609493 IP 10.24.11.201 > 10.2.1.145: ICMP echo request, id 3222, seq 5, length 64
  362. 11:24:28.644693 IP 10.24.11.201 > 10.2.1.145: ICMP echo request, id 3222, seq 6, length 64
  363.  
  364. pi@accesspoint:~ $ sudo tcpdump -ni tun0 'icmp'
  365. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  366. listening on tun0, link-type RAW (Raw IP), capture size 262144 bytes
  367. ^C
  368. 0 packets captured
  369. 0 packets received by filter
  370. 0 packets dropped by kernel
  371.  
  372. 10.20.3.34/27 ┌──────────┐ 10.20.3.33/27
  373. / vpn tunnel │ │
  374. (tun0) ═════════════════════════════════════════════════╗
  375. wifi ┌──bridge(br0)───┐ wired wan │ │ (tun0)
  376. station <.~.~.~> │(wlan0)RPi(eth0)│ <───────> router <─────> │ INTERNET │ <───> (eth0)VPN-REMOTE
  377. | / DHCP-server │ │ /
  378. (dhcp) (br0 by dhcp 10.24.11.1/24 └──────────┘ 52.34.143.147
  379. 10.24.11.231/24)
  380.  
  381. rpi ~$ ping -I 10.24.11.231 52.34.143.147 # success
  382. rpi ~$ ping -I 10.2.0.2 10.2.0.1 # success
  383. station ~$ ping 10.24.11.231 # success
  384.  
  385. station ~$ ping 10.2.0.1 # FAIL
  386.  
  387. rpi ~$ cat /proc/sys/net/ipv4/ip_forward
  388. 1
  389. rpi ~$
  390.  
  391. rpi ~$ ip route
  392. default via 10.24.11.1 dev br0 proto dhcp src 10.24.11.231 metric 1024
  393. 10.20.3.33 dev tun0 proto kernel scope link src 10.20.3.34
  394. 10.24.11.0/24 dev br0 proto kernel scope link src 10.24.11.231
  395. 10.24.11.1 dev br0 proto dhcp scope link src 10.24.11.231 metric 1024
  396.  
  397. station ~$ sudo ip route add 10.20.3.32/27 via 10.24.11.231 dev wlan0 proto static
  398.  
  399. station ~$ ip route
  400. default via 10.24.11.1 dev wlan0 proto dhcp src 10.24.11.244 metric 1024
  401. 10.20.3.32/27 via 10.24.11.231 dev wlan0 proto static
  402. 10.24.11.0/24 dev wlan0 proto kernel scope link src 192.168.50.244
  403. 10.24.11.1 dev wlan0 proto dhcp scope link src 10.24.11.244 metric 1024
  404.  
  405. vpn-remote ~$ sudo ip route add 10.24.11.0/24 via 10.20.3.34 dev tun0 proto static
  406.  
  407. vpn-remote ~$ ip route
  408. default via 192.168.42.1 dev eth0 proto dhcp src 192.168.42.184 metric 1024
  409. 10.20.3.34 dev tun0 proto kernel scope link src 10.20.3.33
  410. 192.168.42.0/24 dev eth0 proto kernel scope link src 192.168.42.184
  411. 192.168.42.1 dev eth0 proto dhcp scope link src 192.168.42.184 metric 1024
  412. 10.24.11.0/24 via 10.20.3.34 dev tun0 proto static
  413.  
  414. rpi ~$ sudo iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement