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

45 lines
1.1 KiB
Markdown

# stop-output-traffic-http-https
Blocks all outgoing http and https traffic
## Requirements
Server `proxy` started
## Installation
```bash
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
```bash
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
```bash
sudo ./stop-output-traffic-http-https.sh
sudo proxyOnOff on
```
Please logout and then login again
```bash
curl -s -o /dev/null --max-time 2 -w "%{http_code}\n" https://gmodocs.dyndns.org
```
The command return code **200**
```bash
sudo proxyOnOff off
```
```bash
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](mailto:gilles.mouchet@gmail.com)