This commit is contained in:
Zhicheng Wang 2024-04-17 10:02:10 +00:00 committed by GitHub
commit 8d9b41d6eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -59,7 +59,7 @@ First, install iptables-persistent. During installation, it will ask you if you
apt install -y iptables-persistent
```
Edit `/etc/iptables/rules.v4` and put this inside:
Edit `/etc/iptables/rules.v4` and put this inside: (There must to be a new line after COMMIT, or it will get an error message ```Bad argument `COMMIT'``` at next step.)
```text
*filter
@ -98,6 +98,7 @@ Edit `/etc/iptables/rules.v4` and put this inside:
-A FORWARD -j REJECT
COMMIT
```
With iptables-persistent, that configuration will be loaded at boot time. But since we are not rebooting right now, we need to load it manually for the first time:
@ -141,6 +142,7 @@ If your server is also reachable over IPv6, edit `/etc/iptables/rules.v6` and ad
-A FORWARD -j REJECT
COMMIT
```
Similar to the IPv4 rules, you can load it manually like this:
```bash