From Chartreuse Lemur, 2 Months ago, written in Plain Text.
Embed
  1. # network interface settings; autogenerated
  2. # Please do NOT modify this file directly, unless you know what
  3. # you're doing.
  4. #
  5. # If you want to manage parts of the network configuration manually,
  6. # please utilize the 'source' or 'source-directory' directives to do
  7. # so.
  8. # PVE will preserve these directives, but will NOT read its network
  9. # configuration from sourced files, so do not attempt to move any of
  10. # the PVE managed interfaces into external files!
  11.  
  12. source /etc/network/interfaces.d/*
  13.  
  14. auto lo
  15. iface lo inet loopback
  16.  
  17. iface lo inet6 loopback
  18.  
  19. auto eno1
  20. iface eno1 inet static
  21.    address 195.201.240.91/26
  22.    gateway 195.201.240.65
  23.    up route add -net 195.201.240.64 netmask 255.255.255.192 gw 195.201.240.65 dev eno1
  24.    pointopoint 195.201.240.65
  25.    up sysctl -w net.ipv4.ip_forward=1
  26.    up sysctl -w net.ipv4.conf.eno1.send_redirects=0
  27.    up iptables -t nat -A PREROUTING -i eno1 -p tcp --dport 443 -j DNAT --to 10.0.0.3:443
  28.    up iptables -t nat -A PREROUTING -i eno1 -p tcp --dport 8080 -j DNAT --to 10.0.0.3:80
  29.    up iptables -t nat -A PREROUTING -i eno1 -p tcp --dport 2222 -j DNAT --to 10.0.0.3:22
  30. # route 195.201.240.64/26 via 195.201.240.65
  31.  
  32. iface eno1 inet6 static
  33.    address 2a01:4f8:231:96::2/64
  34.    gateway fe80::1
  35.    up sysctl -w net.ipv6.conf.all.forwarding=1
  36.  
  37. #iface eth0 inet manual
  38.  
  39. auto vmbr0
  40. iface vmbr0 inet static
  41.    address 195.201.240.91/26
  42.    bridge_ports none
  43.    bridge_stp off
  44.    bridge_fd 0
  45.    up ip route add 195.201.240.90/32 dev vmbr0
  46.  
  47. iface vmbr0 inet6 static
  48.    address 2a01:4f8:231:96::3/64
  49.    up ip -6 route add 2a01:4f8:231:96::/64 dev vmbr0
  50.  
  51. auto vmbr1
  52. iface vmbr1 inet manual
  53.    address 10.0.0.2/24
  54.    bridge-ports none
  55.    bridge-stp off
  56.    bridge-fd 0
  57.    up iptables -t nat -A POSTROUTING -s '10.0.0.0/30' -o eno1 -j MASQUERADE
  58.    down iptables -t nat -D POSTROUTING -s '10.0.0.0/30' -o eno1 -j MASQUERADE
  59.