No Internet on Router behind a server

Hi Guys!

I have disabled my firewall of openwrt with

service stop firewall

I have edited my /etc/config/network

root@OpenWrt:~# cat /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 'fd92:8f75:4ffe::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option ipaddr '192.168.1.3'
	option netmask '255.255.255.0'
	option gateway '192.168.1.1'
	option ip6assign '60'
	list dns '192.168.1.1'

config device 'lan_dev'
	option name 'eth0.1'
	option macaddr '90:50:5a:55:46:38'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0 4 6t'

The Openwrt Router (192.168.1.1,192.168.1.3) is behind a Server with a ip 192.168.11.162
The Main Router has IP 192.168.11.1
The internet is forwarded to the interface where the Openwrt is connected with a wired cable.

I can access the Openwrt Router over ssh but only over the Server

The command

opkg update

fails with following message

root@OpenWrt:~# opkg update
Downloading http://downloads.openwrt.org/releases/18.06.1/targets/ramips/mt7621/packages/Packages.gz
Failed to establish connection
*** Failed to download the package list from http://downloads.openwrt.org/releases/18.06.1/targets/ramips/mt7621/packages/Packages.gz

What iā€™m doing wrong?

Must the gateway set the Main Router IP? And should i set dns also the ip of main Router or a ip from my isp dns server?

So i did some changes.

I edited /etc/config/network to following

root@OpenWrt:~# cat /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 'fd92:8f75:4ffe::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option ipaddr '192.168.11.11'
	option netmask '255.255.255.0'
	option gateway '192.168.1.1'
	option ip6assign '60'
	list dns '192.168.1.1'

config device 'lan_dev'
	option name 'eth0.1'
	option macaddr '90:50:5a:55:46:38'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

Disconnected the Router from the Server and connected directly to the Router

Now the Router is from everywhere accessible with the ip 192.168.11.11
but still no internet

Can you draw a diagram with the devices, connections, and IP addresses?
An IP 192.168.11.11/24 cannot have gateway .1.1 . It must be an address in the same subnet, that of the upstream router.
DNS can be any device that runs nameserver, either your ISP router or googledns (8.8.8.8), or others (1.1.1.1, 1.0.0.1, 8.8.4.4)

2 Likes

[https://drive.google.com/file/d/1K4a29Puf3cX_cVz-I7e8aRWxEPMSQPj0/view?usp=sharing](Network Diagram)

Then what I have to do what with the IP of gateway on OpenWRT Router?
The IP of DNS could be the IP of Main Router or a external DNS Server. Ok i will try it.

It the Gateway 192.168.11.1 of openwrt or as sample 192.168.11.111 ( a unused IP of the Network)

Try both gateway and dns 192.168.11.1

1 Like

Now the router kicked my out of ssh and the webpanel isn't anymore reachable
I did only change the gateway and dns to 192.168.11.1 and hit

service network reload

This would happen only if you are trying to ssh or open luci webpage from another network. Is the workstation within the same subnet 192.168.11.0/24 ?