Here is setup:
- Keenetic Router (192.168.2.1) provides "WAN" for my device with OpenWRT
- OpenWRT eth0 interface via DHCP-client receive it as uplink and get 192.168.2.150 "WAN" address and access to Internet
- OpenWRT eth1 interface (192.168.3.1) with DHCP-server provides DHCP for clients connected to eth1 via switch.
With help of motion package I set up USB-webcam connected to OpenWRT via eth1, so that it can stream video in LAN. So, when I connect my desktop to 192.168.3.X subnet and type in browser 192.168.3.1:8081 I receive http page with embedded video from USB-webcam. Everything if fine.
The problem is that clients connected to Keenetic (subnet 19.168.2.X) can not receive video stream from USB-webcam or motion, for that matter. I mean If I connect desktop PC to Keenetic subnet 192.168.2.X and type 192.168.2.150:8081 I have "connection refused".
I guess it is because of OpenWRT firewall, which do not allow connections to LAN from upper level network, which is considered WAN.
Can you please help me understand how do I fix that? I need to use port forwarding? Thank you.
UPD: As far as I understand I should forward outgoing traffic from 192.168.3.1:8081 (lan) to 8081 (wan)
But It does not work anyway. I guess I must check some checkbox somewhere? It seems that even such a simple settings are always counterintuitive and overcomplicated for no reason. I am completely frustrated.
UPD2: Well. It seems everything is fine now. I can access my webcam stream from upper level subnet.
Here is picture of working port forwarding
It is just seems wrong in some way, but it is working. I was always thinking about port forwarding FORM device, but in OpenWRT ideology, I persume, I must think about forwarding TO device. Well, or may be I just mistyped address several times...