I've got the following network setup
[ISP Router] <---> [Raspbian] <---> [Debian 10 Workstation]
Here's some info from my Raspbian "router"
iptables
has been flushed with iptables -F
, the default policy for all chains is ACCEPT
ip a
reports that on eth0
and eth1
the ip addresses have been set to the values I expect to see. (eth0
is 192.168.1.201
, set using a reserved address by the ISP Router DHCP server. eth1
is set statically using /etc/dhcpcd.conf
to 192.168.2.254
.)
Here is the routing table info:
default via 192.168.1.254 dev eth0 proto dhcp src 192.168.1.201 metric 202
192.168.1.0/24 dev eth0 proto dhcp scope link src 192.168.1.201 metric 202
192.168.2.0/24 dev eth1 proto dhcp scope link src 192.168.2.254 metric 203
I can't see any obvious errors with that, and I believe that with the iptables
clear, and default policy of ACCEPT
, this should be forwarding all packets destined for any addresses in the routing table. cat /proc/sys/net/ipv4/ip_forward
returns 1
.
Here's the info reported by my workstation.
ip route
default via 127.0.0.1 dev enx00500b668976b proto dhcp metric 100
default via 127.0.0.1 dev enx00500b668976b proto dhcp metric 101
10.0.0.0/8 dev enp7s0 proto kernel scope link sec 10.0.0.1
127.0.0.1 dev enx00500b668976b proto dhcp scope link metric 100
192.168.2.0/24 dev enx00500b668976b proto kernel scope link src 192.168.2.10
This looks a bit weird to me.
I can ping 192.168.1.254
from the Rasbian system, but I cannot ping this address from my workstation, suggesting there is a problem with the link between these two devices.
What can I do to diagnose this problem?
Are there any obvious mistakes with the setup I have as indicated by the information above?
192.168.2.0/24
to the pi?192.168.2.0/24
, it needs to know where to send it. You need to set up a static route on the ISP router so that the subnet192.168.2.0/24
is sent to the raspberry pi.iptables -t nat -A POSTROUTING -i eth1 -o eth0 -s 192.168.2.0/24 -j MASQUERADE
may work