Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ cat /etc/network/interfaces
- # network interface settings; autogenerated
- # Please do NOT modify this file directly, unless you know what
- # you're doing.
- #
- # If you want to manage parts of the network configuration manually,
- # please utilize the 'source' or 'source-directory' directives to do
- # so.
- # PVE will preserve these directives, but will NOT read its network
- # configuration from sourced files, so do not attempt to move any of
- # the PVE managed interfaces into external files!
- auto lo
- iface lo inet loopback
- iface eno2 inet manual
- auto eno1
- allow-hotplug eno1
- iface eno1 inet dhcp
- pre-up /etc/network/preup.sh
- post-down /etc/network/postdown.sh
- auto vmbr0
- iface vmbr0 inet static
- address 172.31.1.25/16
- bridge-ports eno2
- bridge-stp off
- bridge-fd 0
- metric 10
- #private sub network
- auto vmbr2
- iface vmbr2 inet static
- address 192.168.1.1
- netmask 255.255.255.0
- bridge_ports none
- bridge_stp off
- bridge_fd 0
- post-up echo 1 | tee /proc/sys/net/ipv4/ip_forward
- post-up iptables -t nat -A POSTROUTING -s '192.168.1.0/24' -o eno1 -j MASQUERADE
- post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o eno1 -j MASQUERADE
- # post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1022 -j DNAT --to 192.168.1.57:22
- # post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 1022 -j DNAT --to 192.168.1.57:22
- #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement