How to create this?

Hello Guys :wave: I am new in Open WRT and I got a FritzBox 7330 flashed with OpenWRT.
My question is how can I use LAN Port 1 as Internet connection in the original Fritz.Box
Is this a feature which is very useful if you put it behind a router

Internet <--Public IPV4--> Fritzbox7590 (192.168.178.1)<--(192.168.178.30)-->OpenWRT (192.168.0.1)

The Open WRT Router should give Clients WiFi DHCP like 192.168.0.20, 192.168.0.21, ..
It should take the Internet from Public IPV4--

The OpenWRT should be Client from Fritz.Box and should work everywhere like also in other Routers

Do you want to have a separate network behind the OpenWrt router, or do you want that device to operate as a dumb AP? Two very different working modes, both easily configurable.

If you want to use the OpenWrt device as an actual router and you want to reassign a lan port to operate as a wan, that's usually pretty simple. We can give you specifics based on your config...

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network

Do you Discord or something else maybe you have some time to show me :)? So I can Open discord

Something else... I use this forum :slight_smile:

The benefit of doing everything here is:

  • multiple people can help you, as needed.
  • you and others can read/observe and learn from the activity on the forum.
  • the knowledge becomes available for future readers looking to do the same or similar things.

So... once you describe your actual goals and provide your config file, we can get to work helping you solve your question/issue.

2 Likes

Oki i want That the Open Wrt got his Network, it should just take his Internet from the Fritzbox 7590 and got this from via DHCP from it

I'm not sure I'm fully understanding your desire...

Do the devices that are connected to the OpenWrt router exist on the same network as the upstream router, or will they be on an entirely different network?

They should have their own Network :slight_smile:

Ok... so you'll be running in a near default state with just a quick modification or two. Post your config as requested and I'll show you what to change.

You mean this? i just reset it because i lost connection to it

root@OpenWrt:~# ubus call system board
{
	"kernel": "5.15.134",
	"hostname": "OpenWrt",
	"system": "AR9 rev 1.2",
	"model": "AVM FRITZ!Box 7320",
	"board_name": "avm,fritz7320",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "23.05.0",
		"revision": "r23497-6637af95aa",
		"target": "lantiq/xway",
		"description": "OpenWrt 23.05.0 r23497-6637af95aa"
	}
}
root@OpenWrt:~# cat /etc/config/network

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

config globals 'globals'
	option ula_prefix 'fd74:0ff2:d583::/48'

config atm-bridge 'atm'
	option vpi '1'
	option vci '32'
	option encaps 'llc'
	option payload 'bridged'
	option nameprefix 'dsl'

config dsl 'dsl'
	option annex 'b'
	option firmware '/lib/firmware/adsl.bin'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device
	option name 'dsl0'
	option macaddr 'c0:25:06:8a:3d:b7'

config interface 'wan'
	option device 'dsl0'
	option proto 'pppoe'
	option username 'username'
	option password 'password'
	option ipv6 '1'

config interface 'wan6'
	option device '@wan'
	option proto 'dhcpv6'

Interestingly, this device seems to have 2 ethernet ports, but I don't see any switch config statements, and it also doesn't appear to be DSA.

It isn't hard to assign the ethernet ports to the wan, but I'm not sure if this device supports VLANs such that you could assign one port as lan and one as wan.

Will this be used for wifi only (for client connections), or will you also need wired connectivity?

Devices should just connect via Wifi thast totaly fine :slight_smile: the LAN Port should be to Internet from the other Box :slight_smile: when i flashed they wrote that only LAN 1 will work, the best or worse is the LAN Port 2 of this is anyways broken :smiley:

Ok....

Before you start making any changes, make sure you have enabled wifi and can connect. Use wifi while you make the necessary changes.

First, change the lan address to 192.168.0.1 (per your request to use this subnet) so that it looks like this:

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.0.1'
	option netmask '255.255.255.0'

Then edit the lan bridge to remove eth0. Add a bridge empty line.

config device
	option name 'br-lan'
	option type 'bridge'
	option bridge_empty '1'

Now create a wan network interface (be sure to use lowercase wan) using eth0 for the device and proto dhcp:

config interface 'wan'
	option device 'eth0'
	option proto 'dhcp'

Reboot your device, connect the ethernet cable and you should be good to go.

how to via Interface or does this work via SSH? with vi network?

Personally, I edit with the vi (within an ssh session). you can also use UCI syntax or the LuCI web interface.

it is empty when i try vi
vi

vi /etc/config/network
1 Like

Sorry, i can post 2 pictures at once

Like this? `root@OpenWrt:/etc/config# cat /etc/config/network

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

config globals 'globals'
	option ula_prefix 'fd74:0ff2:d583::/48'

config atm-bridge 'atm'
	option vpi '1'
	option vci '32'
	option encaps 'llc'
	option payload 'bridged'
	option nameprefix 'dsl'

config dsl 'dsl'
	option annex 'b'
	option firmware '/lib/firmware/adsl.bin'

config device
	option name 'br-lan'
	option type 'bridge'
	option bridge_empty '1'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'

config device
	option name 'dsl0'
	option macaddr 'c0:25:06:8a:3d:b7'

config interface 'wan'
	option device 'eth0'
	option proto 'dhcp'

config interface 'wan6'
	option device '@wan'
	option proto 'dhcpv6'

Yes, but you didn't change your lan subnet (192.168.1.1 currently, you said you wanted 192.168.0.1). That is optional, though... this should work.

Thats no Problem :slight_smile: So now i can Open a Wifi?