Connect two devices over Raspberry-Openwrt

Indeed it is.

Your Ubuntu box's routing table does not have the correct next hop to get to the remote subnet. As a result, it doesn't know where to send any replies.

1 Like

Route is wrong, there is no router configured and tries to find the host in the local lan.

1 Like

Generally this is done by letting a router handle routes instead of installing them in the endpoints. The default route of the 192.168.5.3 device would be 192.168.5.1 (the Raspberry router) and the default route of the 192.168.7.3 device is the other interface on the Raspberry at 192.168.7.1. Then when 192.168.7.3 sends a packet to 192.168.5.3, it is received at the router and routed to the other network based on the table in the router. This table is automatically set up as the two interfaces with 192.168.5.1/24 and 192.168.7.1/24 were created.

As well as the routing table directing forwarding between the two networks, the OpenWrt firewall has to be set to allow such forwarding. The simplest way to do this is to place both new networks into the lan zone. This will allow unrestricted traffic with the device in the 5 and 7 networks having the same access as the lan, so they need to be trusted. After seeing that work you can write more restrictive firewall rules if you want.

Great! Added 192.168.7.1 as gateway and ping is running.
Thanks all!

Ok Next step:
I have to set a route inside Device1. This is not possible in life system dueto lacking admin privilegs.

Can I forward a single IP address e.g. 192.168.5.2 to the device2 that there is no need for setting the route on device1?

Yeah!!
Got it run.
I added port forwarding to my openwrt to use the second address 192.168.5.2 inside openwrt "white":
First I added 192.168.5.2 to eth1.

Now:

Thanks to all for your great support.

2 Likes

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks! :slight_smile:

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