I am trying to set up my raspberry pi to act as a router. The set up is the following:
- The Raspi receives its connection to the internet through Ethernet, with a static IP address setting. The subnet mask for this connection is supposed to be 255.255.255.252, however on other devices it also works with 255.255.255.0.
- I have set up my Raspi to act as a wireless acce point by following this guide: Link
- I have 4-5 devices that connect to the Wifi network generated by the Raspberry Pi.
Once set up, the WiFI access point works for maybe a minute or two. Then, devices connected lose access to the internet, and if they disconnect from the wifi, they cannot reconnect.
I would like to know if anyone has either a solution for this issue, or a method for me to understand what is going on. For example, are there system logs I can look at to understand what is going on? Thanks everyone for the help :D
Dhcpd.conf:
interface eth0
static routers=41.221.98.113
static domain_name_servers=41.221.96.67
static domain_search=41.221.96.68
static ip_address=41.221.98.114/30
interface wlan0
static ip_address=49.221.98.114/24
nohook wpa_supplicant
static routers=
static domain_name_servers=41.221.96.67
static domain_search=41.221.96.68
/etc/sysctl.d/routed-ap.conf
net.ipv4.ip_forward=1
/etc/dnsmasq.conf
interface=wlan0 # Listening interface
dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h
# Pool of IP addresses served via DHCP
domain=wlan # Local wireless DNS domain
address=/gw.wlan/192.168.4.1
# Alias for this router
/etc/hostapd/hostapd.conf
country_code=MW
interface=wlan0
ssid=ssid
hw_mode=g
channel=7
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=passphrase
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
https://www.raspberrypi.org/documentation/confi ... -routed.md
isn't a valid link