LAN - uses BR-LAN (configured to use physical Ports of the router Lan1 to Lan3 and the Wifi)
WAN - uses physical Port LAN4 to connect to external Modem.
In openwrt 21x only Packets were forwarded from Lan2Wan which are accepted in customrules with iptables. All other were blocked.
Now i installed openwrt 23.05 on a testrouter (same hardware) and it seems, all packets were forwarded. I don't even habe to put rules via luci.
If i define trafficrules, for example port 80/443 are accepted in forward to wan and as last rule "all other should rejected" - the http/s are also rejected.
FW General settings: accept accept rejected
Zone Lane->Wan: accept accept accept
Zone WAN ->Rejected: reject accept reject
This is what status/firewall shows for the chain:
Rule container chain "forward_lan"
Rule matches Rule actions #Rule comment: http_https0 BTraffic matched by rule: 0 Packets, 0 BytesTCP source port in set { 80, 443 }80
443 Continue in accept_to_wan #Rule comment: http_https0 BTraffic matched by rule: 0 Packets, 0 BytesUDP source port in set { 80, 443 }80
443 Continue in accept_to_wan #Rule comment: Block_other0 BTraffic matched by rule: 0 Packets, 0 BytesIP protocol is TCP Continue in reject_to_wan #Rule comment: Block_other0 BTraffic matched by rule: 0 Packets, 0 BytesIP protocol is UDP Continue in reject_to_wan #Rule comment: Accept lan to wan forwardingAny packet Continue in accept_to_wan
Any packet Continue in accept_to_lan
The best way to figure out what is happening is to look at 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:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
ubus call system board
cat /etc/config/network
cat /etc/config/firewall
Frankly no idea what is the purpose of this rule? You are allowing responses from (ipv6) lan webservers but you never allowed connections in firsthand.
What is your goal with this router's firewall with respect to access to:
the router itself from the upstream network
the network behind this router from the upstream network
the upstream network from the downstream network.
The rules you have in your firewall are rather strange...
This router sits behind another one, but I notice that NAT Masquerading is not applied on the wan firewall zone. This means that you must have a static route installed on the main router. But then you have some other odd rules, and it's not clear what you are trying to accomplish. If you can describe the goal, we'll help you get there.
You are right. There is a cablerouter which connects to the internet, has internal net 192.168.228.0. This router has a link to the wan port on the openwrt router and a static route to the net 192.168.100.0. Net 228.0 should serve as a dmz.
net 192.168.100.0 is my lanzone on the openwrt. The goal is, i will allow only certain traffic from lan to wan which is allowed by rules, say http/s, ssh, imap, smtp and some other.
Thanks to you and all other helpers here, seems i had a tree before my head. In my old iptables script all is forward to dport, but in lucy-gui i didnt't realize it. Crazy, sometimes you look and look and ... oversee simplest things.