Differences

This shows you the differences between two versions of the page.

Link to this comparison view

topics:proxmox-nat-bridge [2017/03/26 06:40] (current)
orzfly created
Line 1: Line 1:
 +====== Create NAT Bridge in Proxmox ======
  
 +Tested on Proxmox on Debian 8.
 +
 +  - Modify /​etc/​network/​interfaces to add NAT iptables <code - /​etc/​network/​interfaces>​
 +auto vmbr1
 +iface vmbr1 inet static
 +        address ​ 100.64.43.1
 +        netmask ​ 255.255.255.0
 +        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 '​100.64.43.0/​24'​ -o eth0 -j MASQUERADE
 +        post-down iptables -t nat -D POSTROUTING -s '​100.64.43.0/​24'​ -o eth0 -j MASQUERADE
 +</​code>​
 +  - Install dnsmasq <​code>​apt install -y dnsmasq</​code>​
 +  - Modify /​etc/​dnsmasq.d/​config<​code - /​etc/​dnsmasq.d/​config>​
 +domain-needed
 +bogus-priv
 +local=/​cloud/​
 +domain=cloud
 +dhcp-fqdn
 +interface=vmbr1
 +bind-interfaces
 +dhcp-range=100.64.43.200,​100.64.43.250,​72h
 +dhcp-option=option:​router,​100.64.43.1
 +dhcp-option=option:​dns-server,​100.64.43.1
 +</​code>​
 +  - If IPv6 is available, append this snippets<​code - /​etc/​dnsmasq.d/​config>​
 +enable-ra
 +dhcp-range=2001:​xxxx:​xxxx:​xxxx::​1000,​2001:​xxxx:​xxxx:​xxxx::​1fff
 +dhcp-option=option6:​dns-server,​[2001:​xxxx:​xxxx:​xxxx::​]
 +</​code>​
 +  - Enable and start dnsmasq<​code>​
 +systemctl enable dnsmasq
 +systemctl restart dnsmasq
 +</​code>​
 +
 +{{tag>​proxmox nat dnsmasq}}