Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. Thing 1:
  2.  
  3. eth0
  4.  
  5. IP: 172.24.2.1
  6.  
  7. wlan0: (HOSTAPD)
  8.  
  9. IP: 172.24.1.1
  10.  
  11. sysctl net.ipv4.ip_forward
  12. net.ipv4.ip_forward = 1
  13.  
  14. route -n
  15.  
  16. Kernel IP routing table
  17. Destination Gateway Genmask Flags Metric Ref Use Iface
  18. 0.0.0.0 172.24.2.2 0.0.0.0 UG 0 0 0 eth0
  19. 172.24.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
  20. 172.24.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
  21.  
  22. /etc/resolv.conf
  23. # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
  24. # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
  25. nameserver 127.0.0.1
  26.  
  27. iptables-save
  28.  
  29. # Generated by iptables-save v1.6.0 on Mon Sep 25 11:06:45 2017
  30. *nat
  31. :PREROUTING ACCEPT [143:74243]
  32. :INPUT ACCEPT [15:1386]
  33. :OUTPUT ACCEPT [40:2905]
  34. :POSTROUTING ACCEPT [10:927]
  35. -A POSTROUTING -o eth0 -j MASQUERADE
  36. COMMIT
  37. # Completed on Mon Sep 25 11:06:45 2017
  38. # Generated by iptables-save v1.6.0 on Mon Sep 25 11:06:45 2017
  39. *mangle
  40. :PREROUTING ACCEPT [474:101797]
  41. :INPUT ACCEPT [279:24338]
  42. :FORWARD ACCEPT [8:536]
  43. :OUTPUT ACCEPT [223:24658]
  44. :POSTROUTING ACCEPT [226:24674]
  45. COMMIT
  46. # Completed on Mon Sep 25 11:06:45 2017
  47. # Generated by iptables-save v1.6.0 on Mon Sep 25 11:06:45 2017
  48. *filter
  49. :INPUT ACCEPT [279:24338]
  50. :FORWARD ACCEPT [5:380]
  51. :OUTPUT ACCEPT [222:24698]
  52. -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
  53. -A FORWARD -i wlan0 -o eth0 -j ACCEPT
  54. COMMIT
  55.  
  56.  
  57. ===============================================================================
  58.  
  59. Thing 2:
  60.  
  61. eth0
  62.  
  63. IP: 172.24.2.2
  64.  
  65. wlan0: (connected to local internet wifi)
  66.  
  67. IP: 192.168.1.196
  68.  
  69. sysctl net.ipv4.ip_forward
  70. net.ipv4.ip_forward = 1
  71.  
  72. route -n
  73.  
  74. Kernel IP routing table
  75. Destination Gateway Genmask Flags Metric Ref Use Iface
  76. 0.0.0.0 172.24.2.1 0.0.0.0 UG 0 0 0 eth0
  77. 172.24.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
  78. 192.168.1.0 0.0.0.0 255.255.255.0 UG 0 0 0 wlan0
  79.  
  80. /etc/resolv.conf
  81. # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
  82. # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
  83. #nameserver 8.8.8.8
  84. nameserver 192.168.1.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement