Kali/Hotspot/Short: Difference between revisions
From charlesreid1
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
1. Edit the dhcp and dns config files for private wifi network | 1. Edit the dhcp and dns config files for private wifi network | ||
<pre> | |||
# /etc/dhcpcd.conf | |||
interface wlan1 | |||
static ip_address=192.168.4.1/24 | |||
nohook wpa_supplicant | |||
</pre> | |||
<pre> | |||
# /etc/dnsmasq.conf | |||
interface=wlan1 | |||
dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h | |||
</pre> | |||
2. Start the dhcp and dns services for private wifi network | 2. Start the dhcp and dns services for private wifi network | ||
| Line 19: | Line 32: | ||
</pre> | </pre> | ||
4. Start hostapd with wlan1 | 4. Edit the hostapd config file | ||
<pre> | |||
# /etc/hostapd/hostapd.conf | |||
interface=wlan1 | |||
driver=nl80211 | |||
ssid=MyLittlePony | |||
hw_mode=g | |||
channel=7 | |||
wmm_enabled=0 | |||
macaddr_acl=0 | |||
auth_algs=1 | |||
ignore_broadcast_ssid=0 | |||
wpa=2 | |||
wpa_passphrase=AardvarkBadgerHedgehog | |||
wpa_key_mgmt=WPA-PSK | |||
wpa_pairwise=TKIP | |||
rsn_pairwise=CCMP | |||
</pre> | |||
<pre> | |||
# /etc/default/hostapd | |||
DAEMON_CONF="/etc/hostapd/hostapd.conf" | |||
</pre> | |||
5. Start hostapd with wlan1 | |||
<pre> | <pre> | ||
Revision as of 08:45, 1 December 2019
This is the short version of Kali/Hotspot:
1. Edit the dhcp and dns config files for private wifi network
# /etc/dhcpcd.conf
interface wlan1
static ip_address=192.168.4.1/24
nohook wpa_supplicant
# /etc/dnsmasq.conf interface=wlan1 dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h
2. Start the dhcp and dns services for private wifi network
service dhcpcd start || service dhcpcd restart service dnsmasq start || service dnsmasq restart
3. Connect to existing wifi network with wlan2
ifdown wlan2 || ifconfig wlan2 down rfkill unblock wifi && rfkill unblock wlan sleep 3 ifup wlan2 || ifconfig wlan2 up
4. Edit the hostapd config file
# /etc/hostapd/hostapd.conf interface=wlan1 driver=nl80211 ssid=MyLittlePony hw_mode=g channel=7 wmm_enabled=0 macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=2 wpa_passphrase=AardvarkBadgerHedgehog wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP
# /etc/default/hostapd DAEMON_CONF="/etc/hostapd/hostapd.conf"
5. Start hostapd with wlan1
ifconfig wan1 down rfkill unblock wifi rfkill unblock wlan ifconfig wlan1 192.168.4.1/24 up # restart the dhcp service too service dhcpcd start || service dhcpcd restart service hostapd start || service hostapd restart
Flags