OS 및 기타/proxmox
Proxmox VE에서 가상 머신들을 네트워크에 연결하기 위한 브릿지 인터페이스 설정
bright jazz music
2023. 3. 24. 18:59
- 가상화 환경 구성: Proxmox VE에서 가상 머신들을 네트워크에 연결하기 위한 브릿지 인터페이스를 설정.
- 네트워크 분리: 물리적 네트워크(192.168.3.0/24)와 가상 네트워크(10.10.10.0/24)를 분리하여 관리.
- 보안 및 접근성: NAT와 포트 포워딩 규칙을 통해 내부 가상 머신에 대한 외부 접근을 제어.
- 유연성: 주석 처리된 부분을 통해 필요시 추가 네트워크 구성을 쉽게 활성화할 수 있도록 준비.
가상화 환경에서 필요에 따라 내부 서비스를 외부에 안전하게 노출시킬 수 있도록 구성하였음.
현재는 기본적인 네트워크 연결만 활성화되어 있으며, 추가적인 가상 네트워크나 포트 포워딩은 비활성화 상태임.
# 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 enp2s0 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.3.12/24
gateway 192.168.3.1
bridge-ports enp2s0
bridge-stp off
bridge-fd 0
iface wlo1 inet manual
#auto vmbr1
#iface vmbr1 inet static
# address 10.10.10.1/24
# bridge-ports none
# bridge-stp off
# bridge-fd 0
#post-up echo 1 > /proc/sys/net/ipv4/ip_forward # IP 포워딩을 위해 설정
#post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o vmbr0 -j MASQUERADE
#post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o vmbr0 -j MASQUERADE
#10.10.10.2
#post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 443 -j DNAT --to 10.10.10.2:443
#post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 443 -j DNAT --to 10.10.10.2:443
#post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 80 -j DNAT --to 10.10.10.2:80
#post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 80 -j DNAT --to 10.10.10.2:80
#post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 57522 -j DNAT --to 10.10.10.2:443
#post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 22 -j DNAT --to 10.10.10.2:443