Hallo,
ich habe meinen Pi in einen WLAN Router verwandelt.
Code
apt-get update
apt-get upgrade
apt-get install hostapd udhcpd
nano /etc/udhcpd.conf
start 192.168.2.20
end 192.168.2.200
interface wlan0
remaining yes
opt dns 8.8.8.8 8.8.4.4
opt subnet 255.255.255.0
opt lease 864000
nano /etc/default/udhcpd
#DHCPD_ENABLED="no"
nano /etc/network/interfaces
auskommentieren von
#allow-hotplug wlan0
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet manual
iface wlan0 inet static
address 192.168.2.1
netmask 255.255.255.0
nano /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
ssid=IHR_AP_NAME
hw_mode=g
channel=9
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=IHR_PASSWORT
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
ieee80211n=1
nano /etc/default/hostapd
DAEMON_CONF="/etc/hostapd/hostapd.conf"
nano /etc/sysctl.conf
net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
sh -c "iptables-save > /etc/iptables.ipv4.nat"
nano /etc/network/interfaces
up iptables-restore < /etc/iptables.ipv4.nat
update-rc.d hostapd enable
update-rc.d udhcpd enable
Für die Fehlersuche in der hostapd.conf
hostapd /etc/hostapd/hostapd.conf
Alles anzeigen
Funktioniert auch super.
Doch leider kann ich vom LAN aus nicht auf mein Notebook oder meine PS3 zugreifen.
Wie kann ich das erreichen?
Ich meine mich zu Erinnern (lang ist es her) das ich eine statische Route einrichten muss?
192.168.1.x zu 192.168.2.x
Vielen Dank im voraus