Linux server not connecting to internet with OpenWrt router

Hi I very recently started using openwrt for x86/64 on my HP Z230 small form factor workstation. I have BT internet and have setup the router and have got it working for ethernet however it doesnt work on my linux server or my tp link deco. Each device connected can ping the other functional devices however they cannot connect to the internet themselves. Any ideas?

What IPs are the clients getting?

DNS, default GW, etc...

The server is being assigned an ip (10.0.0.215) and the default gateway is 10.0.0.0 (which is correct) and it can ping other devices on the network but just cant ping anything outside the lan

Sounds like a routing issue.

Does internet work from the router?

Post your network and firewall files, from /etc/config/.


firewall:
config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'

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

config zone
option name 'wan'
option output 'ACCEPT'
option masq '1'
option mtu_fix '1'
list network 'wan'
list network 'wan6'
option input 'DROP'
option forward 'DROP'

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 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'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'

config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
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'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'

config rule
option name 'Allow-IPSec-ESP'
option src 'wan'
option dest 'lan'
option proto 'esp'
option target 'ACCEPT'

config rule
option name 'Allow-ISAKMP'
option src 'wan'
option dest 'lan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'

Nope. First IP in an address range is reserved for network address, dont use it for anything else.
So correct your GW to 10.0.0.1 and anything will run. Use a search machine and feed it with "subnetting".

2 Likes

The third octet .0 is invalid as a device IP in a 255.255.255.0 subnet. I'm not sure what you mean by "this is correct" - but it's not.

Yep, agreed.

@PomTog - see: https://www.subnet-calculator.com/

1 Like

As has been stated already, the gateway is your problem because it is invalid.
Interestingly, it appears that Windows will actually be able to connect -- I'm not sure why this is, but there was another recent thread where a user had windows connectivity but other OS's failed. But Linux, Mac OS, iOS, and Android among others will not work because they implement the networking stack according to the proper definition of the subnets.

Hmm i see ill implement this change and get back to you guys, thanks for your input everyone!

Hi everyone thanks for the input it fixed most of my issues, every device on my network can connect now except my server and i cant figure out why. this is a screenshot of the ifconfig command
image

Did the Linux server have the dhcp lease renewed? Try forcing it by restarting the server.

Ah dont worry i accidentally had the default gateway as the old one sorry guys

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.