Using TP-Link WR842ND with OpenWrt (BARRIER BREAKER (Bleeding Edge, r41029)).
Want to connect all wired ports to wan side (as 5 port switch). At the moment ports 3 and 4 will reach LAN side, ports 1 and 2 will not reach anywhere at all. Wifi is working. Wan side is only working in WAN port. Anyone can suggest correct changes to get WAN at ports 1 and 2 (will extend later to all LAN ports 1 to 4)?
/etc/config/network:
Which version of the TL-WR842ND exactly?
v1, v2, v3, v5?
Barrier Breaker is unmaintained and insecure.
Before doing anythoing else, you should update to a more recent release, e.g. 18.06 or 19.07, depending on your version.
This is hw ver 2.1
Not connected to internet, all ntp dns and logging are internal network. The only working service inside this router is ssh for remote management (no password login; with ssh keys generated inside yubikey only). Ofcourse if this is not possible with current version, I can upgrade it - building serial console is not a problem (computers for administration with wired lan are more rare).
First open ports 22 and maybe 80 so you can log in to the router from the wan network. After you reassign the ports, the only access to the lan side will be wireless.
Then make wan a bridge and put both eth0 and eth1 into it. Only four of the ports are hardware switched -- eth0 is direct into the CPU -- so you need a combination of hardware switching and software bridging to link all five.
Thank you! Did'nt expect to be so simple change. Restored default vlan and removed LAN configuration at all. And ofcourse turned off dhcpd (chmod -x /etc/init.d/dnsmasq).
/etc/config/network:
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'wan'
list ifname 'eth0'
list ifname 'eth1'
option type 'bridge'
option proto 'dhcp'