OpenWrt Forum Archive

Topic: Setting Up Custom Firewall Rules

The content of this topic has been archived on 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi, i have a zone - guestwifi set up within the firewall section.

I'm looking to set up the following within Luci and I presume this will need to be achieved through custom rules?

---All Applied Only to Guest Wifi-----


1) Redirect port 80 requests to 192.168.1.137

2) reject port 443 requests not destined for 192.168.1.137

How do I go about this please?

Thanks.

1) You might find kmod-ipt-nat-extra to be useful. It supports the iptables target REDIRECT
2) Set up two rules in the chain. The first rule accepts traffic on tcp/443 to host 192.168.1.137. The second rule denies all traffic on tcp/443. Any traffic on tcp/443 to 192.168.1.137 will trigger the first rule, any traffic on tcp/443 to anywhere else will skip past the first rule and trigger the second rule.

The discussion might have continued from here.