{"id":889,"date":"2023-01-23T20:00:01","date_gmt":"2023-01-23T20:00:01","guid":{"rendered":"https:\/\/server-help.org\/?p=889"},"modified":"2023-02-22T15:58:14","modified_gmt":"2023-02-22T15:58:14","slug":"add-static-ipv4-and-ipv6-addresses-to-openbsd-on-ionos","status":"publish","type":"post","link":"https:\/\/server-help.org\/index.php\/2023\/01\/23\/add-static-ipv4-and-ipv6-addresses-to-openbsd-on-ionos\/","title":{"rendered":"Add Static IPv4 and IPv6 addresses to OpenBSD on IONOS"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">Note: This article has since been made into official IONOS documentation at <a href=\"https:\/\/www.ionos.com\/help?id=5277\">https:\/\/www.ionos.com\/help?id=5277<\/a><\/h1>\n\n\n\n<p>This article details the process of configuring a static IPv4 and IPv6 address on <a rel=\"noreferrer noopener\" href=\"https:\/\/www.openbsd.org\/\" target=\"_blank\">OpenBSD<\/a> machines hosted with IONOS. It is assumed that the IP addresses you wish to use have already been assigned to your server via the Cloud Panel or IONOS Control Panel, and that you can access the command-line.<\/p>\n\n\n\n<p>This configuration will work for both Cloud Servers and Dedicated Servers (both BMC and legacy).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps<\/h2>\n\n\n\n<ol><li>Determine the name of your network interface. You can run <code><strong>ifconfig<\/strong><\/code> to find it, or look through <code><strong>dmesg<\/strong><\/code>.<\/li><li>Create <code>\/etc\/hostname.<strong><span class=\"has-inline-color has-vivid-red-color\">INTERFACE<\/span><\/strong><\/code> with the contents below, replacing the parts in red with your IPs and interface, respectively. You may use <code>vi<\/code>, or your preferred editor.<br><br>You will need to replace <strong><span class=\"has-inline-color has-vivid-red-color\"><code>INTERFACE<\/code><\/span><\/strong> with the exact name of your network interface. (Ex. for <code>vmx0<\/code>, the file would be <code>\/etc\/hostname.vmx0<\/code>)<br><br>The IPv6 section may be omitted, if you do not wish to use IPv6.<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>#IPv4\ninet <strong><span class=\"has-inline-color has-vivid-red-color\">IPV4<\/span><\/strong> 255.255.255.255\n!route add -inet 10.255.255.1 -llinfo -link -static -iface <strong><span class=\"has-inline-color has-vivid-red-color\">INTERFACE<\/span><\/strong>\n!route add -inet default 10.255.255.1\n\n#IPv6\ninet6 alias <strong><span class=\"has-inline-color has-vivid-red-color\">IPV6<\/span><\/strong>\/128\n!route add -net ::\/0 fe80::1%<strong><span class=\"has-inline-color has-vivid-red-color\">INTERFACE<\/span><\/strong><\/code><\/pre>\n\n\n\n<ol start=\"3\"><li>Reboot the system. You may run <strong><code>reboot<\/code><\/strong> from the command-line, or select the reboot option in your Cloud Panel or IONOS Control Panel.<\/li><li>Your server should now have the addresses you have set. You can confirm this by checking the output of <strong><code>ifconfig<\/code><\/strong><\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<p>If you are not able to connect to your server after performing these changes, there are alternate ways to access your server. For Cloud Servers and dedicated servers (BMC), you may use the <a href=\"https:\/\/www.ionos.com\/help\/server-cloud-infrastructure\/getting-started\/accessing-a-server-using-the-kvm-console-cloud-server-and-virtual-server-cloud\/\">KVM<\/a>\/<a href=\"https:\/\/www.ionos.com\/help\/server-cloud-infrastructure\/first-steps-dedicated-servers\/accessing-a-server-via-the-vnc-console-dedicated-server\/\">VNC<\/a> console from your Cloud Panel.<\/p>\n\n\n\n<p>For Legacy Dedicated servers, you may use the <a href=\"https:\/\/www.ionos.com\/help\/server-cloud-infrastructure\/dedicated-server-for-servers-purchased-before-102818\/rescue-and-recovery\/connect-putty-to-the-serial-console-via-ssh\/\">serial console<\/a>, also known as SerCon, to log into your server for troubleshooting.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note: This article has since been made into official IONOS documentation at https:\/\/www.ionos.com\/help?id=5277 This article details the process of configuring a static IPv4 and IPv6 address on OpenBSD machines hosted with IONOS. It is assumed that the IP addresses you wish to use have already been assigned to your server via the Cloud Panel or&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts\/889"}],"collection":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/comments?post=889"}],"version-history":[{"count":12,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts\/889\/revisions"}],"predecessor-version":[{"id":907,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts\/889\/revisions\/907"}],"wp:attachment":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/media?parent=889"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/categories?post=889"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/tags?post=889"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}