2025-10-08 18:35:54 +02:00

1.1 KiB

stop-output-traffic-http-https

Blocks all outgoing http and https traffic

Requirements

Server proxy started

Installation

sudo cp block_outgoing_http_https_traffic/stop-outgoing-traffic-http-https.sh /usr/local/bin/.
sudo chmod +x /usr/local/bin/stop-outgoing-traffic-http-https.sh

Usage

sudo ./stop-outgoing-traffic-http-https.sh

The script takes a few minutes to apply the rules

The rules are not persitent. When you reboot the server, the nft rules are removed

Test

Proxy on

sudo ./stop-output-traffic-http-https.sh
sudo proxyOnOff on

Please logout and then login again

curl -s -o /dev/null --max-time 2 -w "%{http_code}\n" https://gmodocs.dyndns.org

The command return code 200

sudo proxyOnOff off
curl -s -o /dev/null --max-time 2 -w "%{http_code}\n" https://gmodocs.dyndns.org

The command return code 000 (timeout)

Changelog

[1.0.0] - 2025-09-17

Added

  • set firewall rules

Project initialization

  • initialization by GMo