I have OpenWRT set up on a router, with a wireless client connected on the LAN, and connected to another network on the WAN. wlan1
is bridged on the br-lan
interface, and typically forwards to the LAN interface eth0
.
I'm currently sending TCP/UDP packets from a client (192.168.1.20
) on the LAN to a server (128.112.94.34
) on the WAN. When I run tcpdump -len -i br-lan
(viewing the packets on the br-lan
interface, I can see each of these packets coming through, something like:
22:12:03.055370 58:7f:57:0c:e4:80 > c0:56:27:72:a3:5b, ethertype IPv4 (0x0800), length 73: 192.168.1.20.49437 > 128.112.94.34.12341: Flags [P.], seq 105:112, ack 1, win 4117, options [nop,nop,TS val 581515569 ecr 1500229582], length 7
22:12:04.055378 58:7f:57:0c:e4:80 > c0:56:27:72:a3:5b, ethertype IPv4 (0x0800), length 73: 192.168.1.20.49437 > 128.112.94.34.12341: Flags [P.], seq 112:119, ack 1, win 4117, options [nop,nop,TS val 581516566 ecr 1500230581], length 7
22:12:05.042628 58:7f:57:0c:e4:80 > c0:56:27:72:a3:5b, ethertype IPv4 (0x0800), length 73: 192.168.1.20.49437 > 128.112.94.34.12341: Flags [P.], seq 119:126, ack 1, win 4117, options [nop,nop,TS val 581517541 ecr 1500231577], length 7
However, when I run the command on eth0
(tcpdump -len -i eth0
), I get none of the lines above. I've checked my firewall (allowing all connections from LAN to WAN already), route table (192.168.1.x
routes to the default gateway), and nothing obvious to me is preventing this.
My question is: How does the linux kernel route packets from br-lan
to eth0
on a router?
What kinds of subsystems or authentication mechanisms does a router go through to let a packet pass through?