mirror of
https://github.com/pi-hole/docs.git
synced 2024-12-06 19:27:12 +01:00
Include configuration for Debian Bullseye
This commit is contained in:
@@ -44,6 +44,22 @@ PostDown = iptables -w -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -w
|
||||
Substitute `eth0` in the preceding lines to match the Internet-facing interface. This may be `ens2p0` or similar on more recent Ubuntu versions (check, e.g., `ip a` for details about your local interfaces).
|
||||
<!-- markdownlint-enable code-block-style -->
|
||||
|
||||
<!-- markdownlint-disable code-block-style -->
|
||||
!!! warning "**Important:** Debian Bullseye (Debian 11) and Raspian 11"
|
||||
Debian Bullseye doesn't include iptables per default and uses nftables. The iptables commands can be easily implemented since the package will automatically translate and import them to nftables. First you need to install iptables:
|
||||
```bash
|
||||
apt install iptables
|
||||
```
|
||||
|
||||
After that you have to set following rules for PostUP and PostDown:
|
||||
```bash
|
||||
PostUp = iptables -w -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -w -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
||||
PostDown = nft flush ruleset
|
||||
```
|
||||
|
||||
**Be careful with the PostDown command since it will flush all rules!**
|
||||
<!-- markdownlint-enable code-block-style -->
|
||||
|
||||
`PostUp` and `PostDown` defines steps to be run after the interface is turned on or off, respectively. In this case, iptables is used to set Linux IP masquerade rules to allow all the clients to share the server’s IPv4 and IPv6 address.
|
||||
The rules will then be cleared once the tunnel is down.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user