Interface Config
This is my Interfaceconfig for one IP4-Address.
You can change your Config via nano or vim. After making changes, you should restart the server
nano /etc/network/interfacesreboot# 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!
source /etc/network/interfaces.d/*
auto loiface lo inet loopback
iface lo inet6 loopback
auto eno1iface eno1 inet static address <YOUR_IP4_ADDRESS> gateway <YOUR_IP4_GATEWAY> post-up sysctl -w net.ipv4.ip_forward=1 post-up iptables -t nat -A PREROUTING -i eno1 -p tcp -m multiport ! --dport 22,8006 -j DNAT --to 10.10.10.1 post-up iptables -t nat -A PREROUTING -i eno1 -p udp -j DNAT --to 10.10.10.1
iface eno1 inet6 static address <YOUR_IP6_ADDRESS> gateway <YOUR_IP6_GATEWAY>
auto vmbr0iface vmbr0 inet static address 10.10.10.0/31 bridge-ports none bridge-stp off bridge-fd 0 post-up iptables -t nat -A POSTROUTING -s '10.10.10.1/31' -o eno1 -j MASQUERADE post-down iptables -t nat -D POSTROUTING -s '10.10.10.1/31' -o eno1 -j MASQUERADE#OPN-Sense WAN
auto vmbr1iface vmbr1 inet manual bridge-ports none bridge-stp off bridge-fd 0 bridge-vlan-aware yes bridge-vids 2-4094 ovs_type OVSBridge#VLAN-NetworkWhat did i configure?
All Requests to the server except on port 22(SSH) and 8006(proxmox) will get redirected to the opnsense (static IP).
I only configured IPv4 you can also setup it for IPv6 if needed