Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 9997

Troubleshooting • Pi 4 working as a router - troubleshooting

$
0
0
Hello

I am trying to have my Pi 4 (Debian GNU/Linux 12 (bookworm)) working as a router. I think it should be fairly easy.
I just want to route the packets from the eth0 interface to the wlan0 interface and viceversa.

Image

It doesnt work and im stuck.
The Pi is able to ping the wider Internet (and obviously also the Access Point 192.168.1.1).
The PC is able to ping the Pi through the Ethernet cable .
The PC is not able to ping nor the Internet nor the Access Point at 192.168.1.1
It seems to me that the Pi is not forwarding the packets properly.

I believe i am probably missing something very easy. Below i've listed all the things i did.

/etc/dnsmasq.conf → empty file. Everything commented out.
/etc/sysctl.conf → net.ipv4.ip_forward=1
/etc/dhcpcd.conf --> non-existing file
systemd-networkd -> disabled
NetworkManager -> active and running

Code:

#sudo nmcli con add con-name static-ens32 ifname eth0 type ethernet ipv4.method static ip4 192.168.2.1/24 gw4 192.168.1.1 ipv4.dns "192.168.1.1,8.8.8.8"#sudo nmcli conn up static-ens32

Code:

#sudo systemctl mask netfilter.service#sudo systemctl status nftables.service → inactive

Code:

#ip routedefault via 192.168.1.1 dev wlan0 proto dhcp src 192.168.1.13 metric 600192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.13 metric 600192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.1 metric 100

Code:

#ip a2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000    link/ether 2c:cf:67:64:2c:f9 brd ff:ff:ff:ff:ff:ff    inet 192.168.2.1/24 brd 192.168.2.255 scope global noprefixroute eth0       valid_lft forever preferred_lft forever    inet6 fe80::dce2:9e7a:b8fb:4946/64 scope link noprefixroute       valid_lft forever preferred_lft forever3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000    link/ether 2c:cf:67:64:2c:fa brd ff:ff:ff:ff:ff:ff    inet 192.168.1.13/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0       valid_lft 84637sec preferred_lft 84637sec    inet6 fe80::7941:726f:1824:63c2/64 scope link noprefixroute       valid_lft forever preferred_lft forever

Statistics: Posted by koller49 — Tue Jan 20, 2026 11:09 am



Viewing all articles
Browse latest Browse all 9997

Trending Articles