[Proxmox] NAT 설정
2023. 3. 3. 15:24ㆍProxmox
Proxmox 가상 IP 설정 NAT
root@pve3:~# 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 ens1f0 inet manual
#iface ens1f1 inet manual
auto ens1f0
iface ens1f0 inet static
address XXX.XX.X.XX/24
gateway XXX.XX.X.X
#bridge-ports ens1f0
#bridge-stp off
#bridge-fd 0
auto vmbr0
iface vmbr0 inet static
address 192.168.5.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.5.0/24' -o ens1f0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.5.0/24' -o ens1f0 -j MASQUERADE
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
root@pve3:~#
https://pve.proxmox.com/wiki/Network_Configuration#sysadmin_network_masquerading
Network Configuration - Proxmox VE
Proxmox VE does not write changes directly to /etc/network/interfaces. Instead, we write into a temporary file called /etc/network/interfaces.new, this way you can do many related changes at once. This also allows to ensure your changes are correct before
pve.proxmox.com
'Proxmox' 카테고리의 다른 글
[Proxmox] root 비밀번호 분실 후 다시 설정하기 (1) | 2023.03.24 |
---|---|
Proxmox VM, Template 백업, 복원 하기 (0) | 2023.03.11 |
Proxmox ISO 파일 실제 업로드 위치 (2) | 2023.03.09 |
[Proxmox] VM 시작중 에러 발생 (0) | 2023.03.03 |
[Proxmox] 이거 살릴수 있을까? (1) | 2023.02.22 |