I've recently boute a raspberry pi and wanted to create an additional wlan access point for my router. So what I did is, I followed this tutorial:
(Except for the Man in the middle part). So I've connected my router to the ethernet port and than connected the RaspberryPi to via Ethernet to the Router. Internet <-> Router <-> Pi
My Routers IP is 192.168.178.1
My Raspberry Pi's static eth0 address is 192.168.178.23
My Raspberry Pi's static wlan0 address is 192.168.178.90
The DHCP and Hostapd-Parts are working, I get an IP for each of my devices, but I cannot access the internet... (I followed the steps in the tutorial which used iptables to forward all traffic.). Can anyone help me?
interface=wlan0 # Use interface wlan0 bind-interfaces # Bind to the interface to make sure we aren't sending things elsewhere server=126.96.36.199 # Forward DNS requests to Google DNS domain-needed # Don't forward short names bogus-priv # Never forward addresses in the non-routed address spaces. dhcp-range=wlan0,192.168.178.91,192.168.178.160,255.255.255.0,12h # Assign IP addresses between 172.24.1.50 and 172.24.1.150 with a 12 hour lease time
Thanks in advance.
Update: I've changed the address of the wlan0 interface and all connected devices in the range 172.16.4.0/24. Now not even DHCP is working (I have both the Routers and dnsmasqs dhcp running. It shows eth0 in my router (the Pis IP).
Update: I've tried assigning myself a static IP in the wlan0 (Pis) IP-Range and internet access is now working, seems like a mistake in the DHCP-Config, but I still cannot find where... /etc/dhcpcd.conf
interface wlan0 static ip_address=172.16.4.1/24 nohook wpa_supplicant
/etc/dnsmasq.conf hasn't changed, just the assigned adresses to 188.8.131.52 (static) on my computer and internet was working then. Maybe the problem is the wrong gateway...
pi@raspberrypi:~ $ ip route list default via 192.168.178.1 dev eth0 src 192.168.178.23 metric 202 172.16.4.0/24 dev wlan0 proto kernel scope link src 172.16.4.1 metric 303 192.168.178.0/24 dev eth0 proto kernel scope link src 192.168.178.23 metric 202 pi@raspberrypi:~ $ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.178.1 0.0.0.0 UG 202 0 0 eth0 0.0.0.0 172.16.4.1 0.0.0.0 UG 303 0 0 wlan0 172.16.4.0 0.0.0.0 255.255.255.0 U 303 0 0 wlan0 192.168.178.0 0.0.0.0 255.255.255.0 U 202 0 0 eth0