Networking

- To block port 80 (HTTP server) using iptables.
This commit is contained in:
bonnie 2020-07-19 23:18:25 +08:00
parent c434421b77
commit 708ed78958

View File

@ -2492,6 +2492,14 @@ $ sudo iperf -s -p 80
iperf -c <server IP address> --parallel 2 -i 1 -t 2 -p 80 iperf -c <server IP address> --parallel 2 -i 1 -t 2 -p 80
``` ```
##### To block port 80 (HTTP server) using iptables.
```bash
sudo iptables -A INPUT -p tcp --dport 80 -j DROP
# only block connection from an IP address
sudo iptables A INPUT s <IP> -p tcp dport 80 j DROP
```
## Data wrangling ## Data wrangling
[[back to top](#handy-bash-one-liners)] [[back to top](#handy-bash-one-liners)]