Created
August 27, 2013 07:40
-
-
Save werty1st/6350728 to your computer and use it in GitHub Desktop.
hostapd fedora setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ctrl_interface=/var/run/hostapd | |
ctrl_interface_group=wheel | |
# Some usable default settings... | |
macaddr_acl=0 | |
auth_algs=1 | |
ignore_broadcast_ssid=0 | |
# Uncomment these for base WPA & WPA2 support with a pre-shared key | |
wpa=2 | |
wpa_key_mgmt=WPA-PSK | |
wpa_pairwise=TKIP | |
rsn_pairwise=CCMP | |
# DO NOT FORGET TO SET A WPA PASSPHRASE!! | |
wpa_passphrase=12345678 | |
wpa_ptk_rekey=600 | |
# Most modern wireless drivers in the kernel need driver=nl80211 | |
driver=nl80211 | |
# Customize these for your local configuration... | |
interface=wlp0s20u2 | |
hw_mode=g | |
channel=11 | |
ssid=go Vegan | |
wlan befreien: | |
/etc/NetworkManager/NetworkManager.conf | |
[keyfile] | |
unmanaged-devices=mac:XX:XX:XX:XX:XX:XX;mac:00:1E:65:30:D1:C4 | |
#!/usr/bin/bash | |
# hotspot.sh | |
ifconfig wlp0s20u2 10.10.0.1 netmask 255.255.255.0 up | |
echo "1" > /proc/sys/net/ipv4/ip_forward | |
iptables -A FORWARD -o wlp3s0 -s 10.10.0.0/24 -m conntrack --ctstate NEW -j ACCEPT | |
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
iptables -t nat -A POSTROUTING -o wlp3s0 -j MASQUERADE | |
hostapd -B /etc/hostapd/hostapd.conf | |
systemctl restart dhcpd.service | |
#zumindest unter fedora muss man noch mit dem firewall dienstprogramm die standart zone auf masquerade setzen. die eine regel von oben reicht nicht | |
# | |
# DHCP Server Configuration file. | |
# see /usr/share/doc/dhcp*/dhcpd.conf.example | |
# see dhcpd.conf(5) man page | |
# | |
subnet 10.10.0.0 netmask 255.255.255.0 { | |
range 10.10.0.25 10.10.0.50; | |
option domain-name-servers 8.8.4.4, 208.67.222.222; | |
option routers 10.10.0.1; | |
} | |
domain=adb.htc | |
listen-address=10.0.5.1 | |
bind-interfaces | |
dhcp-range=10.0.5.15,10.0.5.20,12h | |
dhcp-option=3,10.0.5.1 | |
#ifconfig wlp0s26u1u4_0 10.0.5.1 netmask 255.255.255.0 | |
#iptables -I INPUT -i wlp0s26u1u4_0 -p udp --dport 67:68 --sport 67:68 -j ACCEPT | |
#iptables -t nat -A POSTROUTING -o wlp0s26u1u4_0 -j MASQUERADE | |
#iptables -I INPUT -i wlp0s26u1u4_0 -j ACCEPT | |
#iptables -A FORWARD -i wlp0s26u1u4_0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment