Advertisement
Guest User

rogue

a guest
Mar 29th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. Creat Access Point
  2.  
  3. sudo apt-get -y install hostapd
  4. sudo nano /etc/default/hostapd
  5. DAEMON_CONF="/etc/hostapd/hostapd.conf"
  6. sudo nano /etc/hostapd/hostapd.conf
  7.  
  8. beacon_int=50
  9.  
  10. #############################################
  11. # Which channel should we use? #
  12. #############################################
  13. channel=3
  14.  
  15. #############################################
  16. # What country are we in? #
  17. #############################################
  18. country_code=NL
  19.  
  20. disassoc_low_ack=1
  21.  
  22. #############################################
  23. # What standard are we communicating in? #
  24. #############################################
  25. driver=nl80211
  26.  
  27. hw_mode=g
  28. ht_capab=[HT40+][HT40-][SHORT-GI-40][RX-STBC1]
  29. ieee80211d=1
  30. ieee80211n=1
  31.  
  32. #############################################
  33. # Which wireless interface should we use? #
  34. #############################################
  35. interface=wlan0
  36.  
  37. require_ht=0
  38. rsn_pairwise=CCMP
  39.  
  40. #############################################
  41. # Enter your SSID (Wi-Fi Network name) #
  42. #############################################
  43. ssid=YOURNETWORKNAME(SSID)
  44.  
  45. wmm_enabled=1
  46. wpa=2
  47. wpa_key_mgmt=WPA-PSK
  48.  
  49. #############################################
  50. # Enter the WPA_KEY (Wi-Fi password) #
  51. # Keep blank to not use a password! #
  52. #############################################
  53. wpa_passphrase=YOURWIFIPASSWORD(PASSPHRASE)
  54.  
  55. #############################################
  56. # Config file taken from Ubuntu.com #
  57. # Extra information added by citricks.net #
  58. #############################################
  59.  
  60. DHCP Server & DNS Relay
  61. sudo apt-get install dnsmasq
  62.  
  63. sudo nano /etc/dnsmasq.conf
  64. interface=lo,wlan0
  65. no-dhcp-interface=lo
  66. dhcp-range=192.168.0.50,192.168.0.150,12h
  67.  
  68. Captive portal
  69. apt-get update
  70. apt-get install hostapd dnsmasq apache2 -y
  71. nano hostapd.conf
  72. interface=wlan0 ( your desired interface name )
  73. ssid=Captive Portal ( your desired access-point name )
  74. hw_mode=g
  75. channel=6
  76. macaddr_acl=0
  77. auth_algs=1
  78. ignore_broadcast_ssid=0
  79. nano dnsmasq.conf
  80. interface=wlan0 ( your desired Interface name )
  81. dhcp-range=10.0.0.10,10.0.0.250,255.255.255.0,12h ( 12h here is the default lease time)
  82. dhcp-option=3,10.0.0.1 ( 3 -> code for default gateway )
  83. dhcp-option=6,10.0.0.1 ( 6 -> code for DNS server )
  84. server=8.8.8.8
  85. log-queries
  86. listen-address=127.0.0.1
  87. $ killall network-manager
  88. $ hostapd hostapd.conf
  89. $ ifconfig wlan0 10.0.0.1
  90. $ dnsmasq -C dnsmasq.conf -d
  91. $ echo 0 > /proc/sys/net/ipv4/ip_forward
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement