TP LINK 3040: Ethernet port as WAN not LAN

Good morning !
I hope this is the correct place for my question, which I'm sure it's a FAQ.
I'm a complete newbie here

I have a usb 4g modem HUAWEI E3372 which is hostless and fixed ip 192.168.8.1
I have upgraded a TP LINK MR3040 to OpenWRT LEDE.
I didn't change anything from the default except the password and strict fundamentals.
I didn't operate on the firewall or port forwarding etc at all.

Now, when I plug the USB modem it automatically connect to internet (as its default)

I can surf internet from my laptop connected to the TP LINK MR3040 via WIFI perfectly
But when I try to use the LAN port, I can't surf.
I believe because the port of the TP LINK MR3040 is connected as LAN not as WAN.

What are the changes in LEDE I have to do so the USB MODEM connection is shared to the ethernet port as well (not only to the wifi) ?

I need to supply internet (via USB modem) to a network of PLC and HMI which are without WIFI and having only ethernet ports.

Thanks
Dado

Pls post your router config: /etc/config/network & /etc/config/firewall

First of all thanks for your time given to answer my post. Appreciate it.
Be patient I'm newbie.

Here is the /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 globals 'globals'
	option ula_prefix 'fd04:44a2:4a90::/48'

config interface 'lan'
	option ifname 'eth0'
	option force_link '1'
	option type 'bridge'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wwan'
	option proto 'dhcp'
	option metric '2'

config interface 'wan2'
	option proto 'dhcp'
	option metric '20'

config interface 'wan1'
	option proto 'dhcp'
	option ifname 'eth1'
	option metric '10'

Here is the /etc/config/firewall

config defaults
	option syn_flood '1'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'REJECT'

config zone
	option name 'lan'
	list network 'lan'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'ACCEPT'

config zone
	option name 'wan'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option masq '1'
	option mtu_fix '1'
	option network 'wan wan6 wwan wan1 wan2'

config forwarding
	option src 'lan'
	option dest 'wan'

config rule
	option name 'Allow-DHCP-Renew'
	option src 'wan'
	option proto 'udp'
	option dest_port '68'
	option target 'ACCEPT'
	option family 'ipv4'

config rule
	option name 'Allow-Ping'
	option src 'wan'
	option proto 'icmp'
	option icmp_type 'echo-request'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-IGMP'
	option src 'wan'
	option proto 'igmp'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-DHCPv6'
	option src 'wan'
	option proto 'udp'
	option src_ip 'fe80::/10'
	option src_port '547'
	option dest_ip 'fe80::/10'
	option dest_port '546'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-MLD'
	option src 'wan'
	option proto 'icmp'
	option src_ip 'fe80::/10'
	list icmp_type '130/0'
	list icmp_type '131/0'
	list icmp_type '132/0'
	list icmp_type '143/0'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Input'
	option src 'wan'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header

Try edit /etc/config/network like this, don't forget backup config & reboot router.

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd04:44a2:4a90::/48'

config interface 'lan'
	option ifname 'eth0'
	option force_link '1'
	option type 'bridge'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan'
	option proto 'dhcp'
	option ifname 'eth1'

Hi Andy
thanks for your help.
Worse.... now the USB STICK connect but 10 seconds later it drop the connection.
Practically he do like this... 10 seconds is UP, 10 seconds is DOWN.
Any anyway when is UP still can't surf and WAN is not giving out any DHCP IP
I restored original confirmation for the moment

Pls provide output of these command:
ifconfig -a
logread

There are two ways to do this.

The first (generally recommended) is to attach the USB cellular modem device to the wan network and firewall zone. Users on the LAN are routed and NATd to the Internet in the conventional way as if a wired Internet service exists.

For this to work, the IP subnet of the WAN has to be different from that of the LAN. You said that the modem is 192.168.1.1/ thus the IP's of the LAN must be something outside this range such as 192.168.2.1/24.

If the addresses conflict as they do in the configuration you posted, everything may seem connected but it will not be possible to reach the Internet.


The other way would be to bridge the modem into the LAN, making the router a dumb bridge / AP / USB driver. All the routing and DHCP assignments would be handled by the modem. This assumes the modem is capable of such operation. Only one IP network exists, which is completely controlled by the routing functions inside the modem. There is no routing or NAT by OpenWrt.

Here you would set up the router as a "dumb AP", in particular you would:

  • Disable the OpenWrt DHCP server, both IPv4 and IPv6. The modem contains a DHCP server which will assign addresses in the 192.168.1.x range. The users of the network can be either DHCP clients or have static IP's in the 192.168.1.0/24 range.
  • Place the modem's virtual Ethernet port in the LAN.
  • The router LAN is another user of the network, so it can be either a static address that doesn't conflict with anything (especially the modem) or a DHCP client. Using a DHCP client means that the modem has to be connected and working before the router gets an IP address and you will have to discover OpenWrt's address to log in to it. So in the beginning stages I suggest a static IP such as 192.168.1.2.