{"id":588,"date":"2018-04-12T16:18:15","date_gmt":"2018-04-12T07:18:15","guid":{"rendered":"http:\/\/manatails.net\/blog\/?p=588"},"modified":"2022-04-03T13:48:54","modified_gmt":"2022-04-03T04:48:54","slug":"running-proxmox-with-nat","status":"publish","type":"post","link":"https:\/\/manatails.net\/blog\/2018\/04\/running-proxmox-with-nat\/","title":{"rendered":"Running Proxmox with NAT"},"content":{"rendered":"<p>The default proxmox installation only supports basic NAT function with limited capabilities.<\/p>\n<p>In order to create a working internal network you need to define a new network manually<\/p>\n<p>Add the following entry to \/etc\/network\/interfaces<\/p>\n<p>vmbr0 is the WAN interface, if you use a different interface change it accordingly.<\/p>\n<p><code><br \/>\nauto vmbr1<br \/>\niface vmbr1 inet static<br \/>\naddress\u00a0 10.0.0.1<br \/>\nnetmask\u00a0 255.255.255.0<br \/>\nbridge_ports none<br \/>\nbridge_stp off<br \/>\nbridge_fd 0<\/code><br \/>\n<code><br \/>\npost-up echo 1 &gt; \/proc\/sys\/net\/ipv4\/ip_forward<br \/>\n<\/code><br \/>\n<code><br \/>\npost-up iptables -t nat -A POSTROUTING -s '10.0.0.0\/24' -o vmbr0 -j MASQUERADE<br \/>\npost-down iptables -t nat -D POSTROUTING -s '10.0.0.0\/24' -o vmbr0 -j MASQUERADE<br \/>\n<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>And add port forwarding rules like this:<br \/>\n<code><br \/>\npost-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 222 -j DNAT --to 10.0.0.100:22<br \/>\npost-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 222 -j DNAT --to 10.0.0.100:22<br \/>\n<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>Apply the settings with:<br \/>\n<code>\/etc\/init.d\/networking restart<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The default proxmox installation only supports basic NAT function with limited capabilities. In order to create a working internal network you need to define a new network manually Add the following entry to \/etc\/network\/interfaces vmbr0 is the WAN interface, if you use a different interface change it accordingly. auto vmbr1 iface vmbr1 inet static address\u00a0 &hellip; <a href=\"https:\/\/manatails.net\/blog\/2018\/04\/running-proxmox-with-nat\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Running Proxmox with NAT<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[14,122,123],"class_list":["post-588","post","type-post","status-publish","format-standard","hentry","category-computer","tag-linux","tag-proxmox","tag-vm"],"_links":{"self":[{"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/posts\/588","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/comments?post=588"}],"version-history":[{"count":6,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/posts\/588\/revisions"}],"predecessor-version":[{"id":1038,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/posts\/588\/revisions\/1038"}],"wp:attachment":[{"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/media?parent=588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/categories?post=588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/tags?post=588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}