# How to setup this?

**URL:** <https://forum.openwrt.org/t/how-to-setup-this/174298>\
**Category:** Network and Wireless Configuration\
**Created:** [October 13, 2023, 6:48pm UTC](https://forum.openwrt.org/t/how-to-setup-this/174298 "2023-10-13T18:48:41Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![waterhasnocalories](https://forum.openwrt.org/user_avatar/forum.openwrt.org/waterhasnocalories/32/83056_2.png) [@waterhasnocalories](https://forum.openwrt.org/u/waterhasnocalories)\
**Post date:** [October 13, 2023, 6:48pm UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/1 "2023-10-13T18:48:41Z")

</div>

First of all.. total noob here..

I am on the Router of my landlord, which is set up in a way that devices connected to it can't see each other (good thing, I guess) but I have some devices that need to interact witch each other.

Everything works as I wanted except for the internet speed (I've read it is because the pi's internal wifi is kinda crap) The connection between the devices is fast and stable. Because of that all I would like to change is that the pi is connected to the landlords router via LAN. When I do so I have no internet at all except if I match the Openwrts Network to the one of the landslords so to 192.168.100.X, if I do that all works fine. But I really want to keep the 10.69.69.XX network because all things I used are configured exactly to that.

So basically what I want is this:

 ![setup](https://forum.openwrt.org/uploads/default/original/3X/1/f/1ffe63eab17d1fb64899e51b84791a89b2b89497.png)  
and the only thing I have issues with is (I suppose atleast) the connection via lan to the landlords router.

I tried google alot (as I did for the rest of the setup) but with this issue I am to bad at describing the issue and because of that always end up reading something unrelated to my isse.

Anyone can help a noob out?

---

<div class="post-metadata">

**Author:** ![elbertmai](https://forum.openwrt.org/letter_avatar/elbertmai/32/5_5575768a8748004e209b776fc1b2916d.png) [@elbertmai](https://forum.openwrt.org/u/elbertmai)\
**Post date:** [October 13, 2023, 7:54pm UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/2 "2023-10-13T19:54:05Z")

</div>

> [@waterhasnocalories](#):
>
> Everything works as I wanted except for the internet speed (I've read it is because the pi's internal wifi is kinda crap)

Raspberry Pi's WiFi performance as a general-use AP is garbage. Use a device designed for this task like a wireless AP or router (which can always be used as an AP). Also, the Pi 3B+'s LAN is not true gigabit, it's capped at 300 Mb/s because the NIC is connected to the CPU over a USB 2.0 link.

If you want to stick to using a Raspberry Pi as a router and not have terrible performance, you need at least Raspberry Pi 4 and a RTL8153-based USB Ethernet adapter (like TP-Link UE300). Then you attach a WiFi AP to that to get _much better_ WiFi coverage and speeds.

---

<div class="post-metadata">

**Author:** ![waterhasnocalories](https://forum.openwrt.org/user_avatar/forum.openwrt.org/waterhasnocalories/32/83056_2.png) [@waterhasnocalories](https://forum.openwrt.org/u/waterhasnocalories)\
**Post date:** [October 13, 2023, 8:08pm UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/3 "2023-10-13T20:08:48Z")

</div>

I am fine with 100ish download as I am living in a rural area. So the Pi3 is arguably enough for my needs. Just need to fix the issue.

Thanks for your input, though.

---

<div class="post-metadata">

**Author:** ![elbertmai](https://forum.openwrt.org/letter_avatar/elbertmai/32/5_5575768a8748004e209b776fc1b2916d.png) [@elbertmai](https://forum.openwrt.org/u/elbertmai)\
**Post date:** [October 13, 2023, 8:23pm UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/4 "2023-10-13T20:23:31Z")

</div>

If speed isn't the issue, then your previous setup should be OK. If the issue you're encountering is this:

> [@waterhasnocalories](#):
>
> When I do so I have no internet at all except if I match the Openwrts Network to the one of the landslords so to 192.168.100.X, if I do that all works fine.

This is expected. If you don't understand why this works and using 10.69.69.1 doesn't, you need to read up on [how IPv4 subnetting works](https://serverfault.com/questions/49765/how-does-ipv4-subnetting-work).

Basically it's because your WiFi clients get IP addresses in the 192.168.100.\* subnet, which are assigned by the landlord's router. If you try to ping 10.69.69.1 from such a client, the client will send the packet to the landlord's router (not to your Pi) because it's not in the same subnet. The landlord's router is not going to have a route to 10.69.69.1 setup, so it drops it and it won't work.

But if you set the router's IP to 192.168.100.\*, it will be in the same subnet, so clients can send the packet directly to the Pi and not involve the landlord's router at all.

---

<div class="post-metadata">

**Author:** ![psherman](https://forum.openwrt.org/letter_avatar/psherman/32/5_5575768a8748004e209b776fc1b2916d.png) [@psherman](https://forum.openwrt.org/u/psherman)\
**Post date:** [October 13, 2023, 8:48pm UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/5 "2023-10-13T20:48:09Z")

</div>

> [@elbertmai](#):
>
> But if you set the router's IP to 192.168.100.\*, it will be in the same subnet, so clients can send the packet directly to the Pi and not involve the landlord's router at all.

Beyond some semantics around it, this is not really correct... the OP has almost certainly setup the Pi as a dumb AP (rather than a router). This means that the Pi is simply bridge, and is doing no routing or firewall operations. It simply passes data betweeh the ethernet and wifi interfaces transparently.

In order for the OP to use the Pi as a router, it is necessary to create a wan interface. It is not hard to do assuming somethign near defaults...

- remove `eth0` from `br-lan`
- create a wan interface with `eth0` that looks like this (note the lowercase 'wan' -- this is important since there is already a default wan firewall zone that contains the 'wan' network in lowercase):

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

```

I do agree that the Pi's wifi is terrible and that the best option is to use a real AP for this purpose. With the built-in wifi, you'll be severely limited with resepct to general bandwidth, number of devices that can work well on the Pi's AP mode config, and of course range. To add an AP, you'll need another ethernet connection or a managed switch that you can use to connect the AP (and/or any other devices). But, once you're going that far, you might just get an all-in-one wifi router to replace the Pi -- even modest ones on the used market will perform on-par or better than the Pi3.

---

<div class="post-metadata">

**Author:** ![waterhasnocalories](https://forum.openwrt.org/user_avatar/forum.openwrt.org/waterhasnocalories/32/83056_2.png) [@waterhasnocalories](https://forum.openwrt.org/u/waterhasnocalories)\
**Post date:** [October 13, 2023, 9:16pm UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/6 "2023-10-13T21:16:04Z")

</div>

Hey there! Thanks for your reply.

my /etc/config/network looks like this at the moment:

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 'fd02:15ca:a913::/48'

config device  
option name 'br-lan'  
option type 'bridge'  
list ports 'usb0' ///// this is a pi zero connected as an usb gadget to get internet

config interface 'lan'  
option device 'br-lan'  
option proto 'static'  
option ipaddr '10.69.69.1'  
option netmask '255.255.255.0'  
option ip6assign '60'  
list dns '8.8.8.8'  
list dns '1.1.1.1'

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

with this setup it doesn't work. I have my local network but I do not have internetacces

---

<div class="post-metadata">

**Author:** ![waterhasnocalories](https://forum.openwrt.org/user_avatar/forum.openwrt.org/waterhasnocalories/32/83056_2.png) [@waterhasnocalories](https://forum.openwrt.org/u/waterhasnocalories)\
**Post date:** [October 13, 2023, 9:40pm UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/7 "2023-10-13T21:40:06Z")

</div>

But why does it work, when I connect to the landlords router via Wifi, then?

---

<div class="post-metadata">

**Author:** ![psherman](https://forum.openwrt.org/letter_avatar/psherman/32/5_5575768a8748004e209b776fc1b2916d.png) [@psherman](https://forum.openwrt.org/u/psherman)\
**Post date:** [October 13, 2023, 9:52pm UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/8 "2023-10-13T21:52:59Z")

</div>

I thought you were working with a Pi3B... my bad on the assumption.

> [@waterhasnocalories](#):
>
> list ports 'usb0' ///// this is a pi zero connected as an usb gadget to get internet

So this is what you'll need to remove from `br-lan`.

> [@waterhasnocalories](#):
>
> config interface 'wan'  
> option device 'eth0'  
> option proto 'dhcp'

and since you don't have eth0, you'll be putting your `usb0` device here (instead of `eth0`)

---

<div class="post-metadata">

**Author:** ![waterhasnocalories](https://forum.openwrt.org/user_avatar/forum.openwrt.org/waterhasnocalories/32/83056_2.png) [@waterhasnocalories](https://forum.openwrt.org/u/waterhasnocalories)\
**Post date:** [October 13, 2023, 10:03pm UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/9 "2023-10-13T22:03:41Z")

</div>

No, this was a missunderstanding.

I use a Pi3B.  
The Pizero runs pihole thats why it is connected via usb to get internet acess as it doesn't have wifi.  
Currently I connect to the landlord wifi via the internal Pi3B wifi interface. I also have a usb wifi dongle which is broadcasting the OpenWrt. This part is working perfectly. I am just having issues still with the connection from the 3B to the landlord router via Lan.

---

<div class="post-metadata">

**Author:** ![psherman](https://forum.openwrt.org/letter_avatar/psherman/32/5_5575768a8748004e209b776fc1b2916d.png) [@psherman](https://forum.openwrt.org/u/psherman)\
**Post date:** [October 13, 2023, 10:05pm UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/10 "2023-10-13T22:05:44Z")

</div>

let's see the config from the 3b

Please connect to your OpenWrt device [using ssh](https://openwrt.org/docs/guide-quick-start/sshadministration) and copy the output of the following commands and post it here using the "Preformatted text `</>` " button:  
 ![grafik](https://forum.openwrt.org/uploads/default/original/2X/3/3396953c05b720cafad6df6dec38534c63580b9e.png)  
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

```plaintext
ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

```

---

<div class="post-metadata">

**Author:** ![waterhasnocalories](https://forum.openwrt.org/user_avatar/forum.openwrt.org/waterhasnocalories/32/83056_2.png) [@waterhasnocalories](https://forum.openwrt.org/u/waterhasnocalories)\
**Post date:** [October 13, 2023, 11:36pm UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/11 "2023-10-13T23:36:17Z")

</div>

```plaintext
{
        "kernel": "5.10.176",
        "hostname": "OpenWrt",
        "system": "ARMv8 Processor rev 4",
        "model": "Raspberry Pi 3 Model B Plus Rev 1.3",
        "board_name": "raspberrypi,3-model-b-plus",
        "rootfs_type": "ext4",
        "release": {
                "distribution": "OpenWrt",
                "version": "22.03.5",
                "revision": "r20134-5f15225c1e",
                "target": "bcm27xx/bcm2710",
                "description": "OpenWrt 22.03.5 r20134-5f15225c1e"
        }
}

**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 'fd02:15ca:a913::/48'

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

config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '10.69.69.1'
option netmask '255.255.255.0'
option ip6assign '60'
list dns '8.8.8.8'
list dns '1.1.1.1'

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

**wireless**
config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option disabled '0'
        option short_gi_40 '0'
        option cell_density '0'
        option country 'DE'
        option hwmode '11g'
        option htmode 'HT40'
        option channel '9'

config wifi-iface 'wifinet1'
        option device 'radio0'
        option mode 'sta'
        option network 'wwan'
        option bssid 'redacted'
        option ssid 'redacted'
        option encryption 'psk2'
        option key 'redacted'

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0'
        option band '2g'
        option disabled '0'

**dhcp**

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option localservice '1'
        option ednspacket_max '1232'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

**firewall**
config defaults
        option input 'ACCEPT'
        option output 'ACCEPT'
        option synflood_protect '1'
        option forward 'ACCEPT'

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

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

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

```

---

<div class="post-metadata">

**Author:** ![psherman](https://forum.openwrt.org/letter_avatar/psherman/32/5_5575768a8748004e209b776fc1b2916d.png) [@psherman](https://forum.openwrt.org/u/psherman)\
**Post date:** [October 13, 2023, 11:43pm UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/12 "2023-10-13T23:43:13Z")

</div>

Are you connecting via wired or wireless?

You appear to have 2 ethernet ports on the Pi -- the built-in one and a USB adapter. Is that the case? (or is that usb0 device a wifi adapter??)

You also have a sta (client) mode configuration for the Pi's wifi, connected to network `wwan` but then no network interface with that name is defined (although you also have that network added to the wan firewall zone). Since that network doesn't exist, you won't get an uplink (if you're relying on wifi uplink).

Another thing... if you're using the wifi for STA mode, be aware that the Pi's wifi chipset cannot run simultaneous AP + STA mode operation, so the only physical connection you have available for your own devices would be via usb0's function.

Your firewall file looks very incomplete -- did you omit things, or is that the entirety?

---

<div class="post-metadata">

**Author:** ![waterhasnocalories](https://forum.openwrt.org/user_avatar/forum.openwrt.org/waterhasnocalories/32/83056_2.png) [@waterhasnocalories](https://forum.openwrt.org/u/waterhasnocalories)\
**Post date:** [October 13, 2023, 11:55pm UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/13 "2023-10-13T23:55:30Z")

</div>

the second lan is the pi zero that is used in usb gadget mode.  
yes I have that wifi interface up and just delete the connection when trying with the lan cabel.

If i use that wifi (its the internal one) to connect to the landlord router I have internet access shared with the other wifi device.

---

<div class="post-metadata">

**Author:** ![psherman](https://forum.openwrt.org/letter_avatar/psherman/32/5_5575768a8748004e209b776fc1b2916d.png) [@psherman](https://forum.openwrt.org/u/psherman)\
**Post date:** [October 14, 2023, 12:59am UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/14 "2023-10-14T00:59:57Z")

</div>

ok.

- disable the wifi sta mode.
- enable wifi in AP mode with the wifi connected to the `lan` network.
- connect a computer to the Pi's wifi and verify that it gets an address in the 10.69.69.0/24 network and can access the OpenWrt admin (ssh and/or LuCI web interface)
- connect a cable between the Pi's built-in ethernet (eth0) and your landlord's router
- provide the output of `ip addr show`

---

<div class="post-metadata">

**Author:** ![mk24](https://forum.openwrt.org/letter_avatar/mk24/32/5_5575768a8748004e209b776fc1b2916d.png) [@mk24](https://forum.openwrt.org/u/mk24)\
**Post date:** [October 14, 2023, 1:20am UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/15 "2023-10-14T01:20:38Z")

</div>

The firewall wan zone only lists wwan, which does not exist. You need to add your wired wan (named `wan`) to the firewall wan zone. And like @psherman said, get rid of everything related to a wireless WAN.

---

<div class="post-metadata">

**Author:** ![psherman](https://forum.openwrt.org/letter_avatar/psherman/32/5_5575768a8748004e209b776fc1b2916d.png) [@psherman](https://forum.openwrt.org/u/psherman)\
**Post date:** [October 14, 2023, 1:25am UTC](https://forum.openwrt.org/t/how-to-setup-this/174298/16 "2023-10-14T01:25:21Z")

</div>

> [@mk24](#):
>
> The firewall wan zone only lists wwan,

Good catch.
