Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Creat Access Point
- sudo apt-get -y install hostapd
- sudo nano /etc/default/hostapd
- DAEMON_CONF="/etc/hostapd/hostapd.conf"
- sudo nano /etc/hostapd/hostapd.conf
- beacon_int=50
- #############################################
- # Which channel should we use? #
- #############################################
- channel=3
- #############################################
- # What country are we in? #
- #############################################
- country_code=NL
- disassoc_low_ack=1
- #############################################
- # What standard are we communicating in? #
- #############################################
- driver=nl80211
- hw_mode=g
- ht_capab=[HT40+][HT40-][SHORT-GI-40][RX-STBC1]
- ieee80211d=1
- ieee80211n=1
- #############################################
- # Which wireless interface should we use? #
- #############################################
- interface=wlan0
- require_ht=0
- rsn_pairwise=CCMP
- #############################################
- # Enter your SSID (Wi-Fi Network name) #
- #############################################
- ssid=YOURNETWORKNAME(SSID)
- wmm_enabled=1
- wpa=2
- wpa_key_mgmt=WPA-PSK
- #############################################
- # Enter the WPA_KEY (Wi-Fi password) #
- # Keep blank to not use a password! #
- #############################################
- wpa_passphrase=YOURWIFIPASSWORD(PASSPHRASE)
- #############################################
- # Config file taken from Ubuntu.com #
- # Extra information added by citricks.net #
- #############################################
- DHCP Server & DNS Relay
- sudo apt-get install dnsmasq
- sudo nano /etc/dnsmasq.conf
- interface=lo,wlan0
- no-dhcp-interface=lo
- dhcp-range=192.168.0.50,192.168.0.150,12h
- Captive portal
- apt-get update
- apt-get install hostapd dnsmasq apache2 -y
- nano hostapd.conf
- interface=wlan0 ( your desired interface name )
- ssid=Captive Portal ( your desired access-point name )
- hw_mode=g
- channel=6
- macaddr_acl=0
- auth_algs=1
- ignore_broadcast_ssid=0
- nano dnsmasq.conf
- interface=wlan0 ( your desired Interface name )
- dhcp-range=10.0.0.10,10.0.0.250,255.255.255.0,12h ( 12h here is the default lease time)
- dhcp-option=3,10.0.0.1 ( 3 -> code for default gateway )
- dhcp-option=6,10.0.0.1 ( 6 -> code for DNS server )
- server=8.8.8.8
- log-queries
- listen-address=127.0.0.1
- $ killall network-manager
- $ hostapd hostapd.conf
- $ ifconfig wlan0 10.0.0.1
- $ dnsmasq -C dnsmasq.conf -d
- $ echo 0 > /proc/sys/net/ipv4/ip_forward
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement