Utils
This commit is contained in:
@@ -102,3 +102,58 @@ post-down iptables -t nat -D POSTROUTING -s '192.168.100.0/24' -o enp7s0 -j MASQ
|
|||||||
post-up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
|
post-up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
|
||||||
post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1
|
post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## OVH
|
||||||
|
|
||||||
|
```bash
|
||||||
|
iface lo inet loopback
|
||||||
|
|
||||||
|
iface eno1 inet manual
|
||||||
|
|
||||||
|
iface enp3s0f1 inet manual
|
||||||
|
|
||||||
|
auto vmbr0
|
||||||
|
iface vmbr0 inet static
|
||||||
|
address 167.114.172.204/24
|
||||||
|
gateway 167.114.172.254
|
||||||
|
bridge-ports eno1
|
||||||
|
bridge-stp off
|
||||||
|
bridge-fd 0
|
||||||
|
hwaddress AC:1F:6B:05:B7:84
|
||||||
|
|
||||||
|
iface vmbr0 inet6 static
|
||||||
|
address 2607:5300:60:73cc::/64
|
||||||
|
gateway 2607:5300:60:73ff:ff:ff:ff:ff
|
||||||
|
|
||||||
|
#auto vmbr100
|
||||||
|
#iface vmbr100 inet static
|
||||||
|
# address 192.168.100.0/24
|
||||||
|
# bridge-ports none
|
||||||
|
# bridge-stp off
|
||||||
|
# bridge-fd 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#auto vmbr0
|
||||||
|
#iface vmbr0 inet static
|
||||||
|
# address 167.114.172.204/24
|
||||||
|
# gateway 167.114.172.254
|
||||||
|
# bridge-ports eno1
|
||||||
|
# bridge-stp off
|
||||||
|
# bridge-fd 0
|
||||||
|
# hwaddress AC:1F:6B:05:B7:84
|
||||||
|
|
||||||
|
auto vmbr100
|
||||||
|
iface vmbr100 inet static
|
||||||
|
address 192.168.100.1/24
|
||||||
|
bridge-ports none
|
||||||
|
bridge-stp off
|
||||||
|
bridge-fd 0
|
||||||
|
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||||
|
post-up iptables -t nat -A POSTROUTING -s '192.168.100.0/24' -o vmbr0 -j MASQUERADE
|
||||||
|
post-down iptables -t nat -D POSTROUTING -s '192.168.100.0/24' -o vmbr0 -j MASQUERADE
|
||||||
|
#NAT
|
||||||
|
|
||||||
|
post-up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
|
||||||
|
post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user