OpenWrt Forum Archive

Topic: External block all firewall

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

Hi all, hoping to pick at your brains to point me in the right direction. I'm wanting a way to block all external connections (including concurrent) for a brief period of time and then an easy way to switch back. I need internal ips to communicate during the period, I have an old laptop with zone alarm that currently has a button to pause all external traffic, I basically want something similar but on the router that can be turned on/off through the CLI..

I'm going to look at ways of doing so but basically hoping for any suggestions that might help me?

Thanks!

David

Might be mistaken here, but I thought just stopping firewall service would accomplish what you want. And if it would, you can tie it to the hardware button if your router has it.

Stopping the firewall service is not the same as blocking all external connections.

If you want to stop all forwarding of packets (from internal to external and external to internal) you can use iptables:

iptables -I FORWARD -j DROP

Or you could just turn forwarding off (do the same for Ipv6)

echo 0 > /proc/sys/net/ipv4/ip_forward

The discussion might have continued from here.