OpenWrt Forum Archive

Topic: block all port exepts 80 and 443

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

Hello everyone.
I'm using OpenWRT 15:05 chaos calmer , but do not know how I should proceed from the web interface , I would like to leave open only the ports 80 and 443 for navigation, and all the other closed.
and going opening doors according to need ,
I appreciate any help

I'd start by downloading the factory 15.05 image to your computer so you could reflash your router if you mess things up, but I believe you need to go to Network->Firewall->Traffic Rules and add new forward rule for:
source zone: lan
protocol: tcp
destination zone: wan
ports:80,443
action: accept

and then another rule for lan to wan with action drop and everything else default.

Make sure that both rules are enabled and after that you need to restart firewall.

Disclaimer: I'm not a firewall expert, so you may want to wait until other, more experienced users either confirm or correct me.

(Last edited by stangri on 12 Feb 2016, 04:36)

thanks for the answer.
I made the rules this way


http://s13.postimg.org/u91xjwdp3/Captura_de_Tela_2016_02_12_a_s_08_34_11.png


it worked!
there is only navigation.
thank you so much

Well, I tried doing exactly that, and when it didn't work, I also followed Guest Wifi Guide ( https://wiki.openwrt.org/doc/recipes/gu … _and_https ) to the letter.

The result is the same - no access to www at all on guest wifi.
And I cannot ping www addresses, but I can ping ips, like 8.8.8.8

Am I doing something wrong? I doubt it because I did exactly what was written in the wiki.

Did you allow guest network access to your DNS?

The discussion might have continued from here.