{"id":1957,"date":"2021-04-17T02:36:01","date_gmt":"2021-04-17T02:36:01","guid":{"rendered":"https:\/\/dft.wiki\/?p=1957"},"modified":"2021-04-17T15:04:26","modified_gmt":"2021-04-17T15:04:26","slug":"configuring-ip-manually-and-removing-ipv6-from-a-linode-vm","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=1957","title":{"rendered":"Configuring IP Manually and Removing IPv6 from a Linode VM"},"content":{"rendered":"<p>In order to set up an Active Directory \/ Domain Controller on the cloud assigning the IP manually and removing IPv6 prevents any future issue.<\/p>\n<p>Start with a fresh virtual machine and give it a name:<\/p>\n<pre>sudo hostnamectl set-hostname <strong>ad0<\/strong><\/pre>\n<p>Configure the interface using <strong>netplan<\/strong>:<\/p>\n<pre>sudo systemctl enable systemd-networkd\r\nsudo rm \/etc\/systemd\/network\/05-eth0.network\r\nsudo rm \/etc\/netplan\/00-installer-config.yaml\r\nsudo nano \/etc\/netplan\/00-installer-config.yaml<\/pre>\n<p>For the primary AD-DC:<\/p>\n<pre>network:\r\n  version: 2\r\n  renderer: networkd\r\n  ethernets:\r\n    eth0:\r\n      dhcp4: no\r\n      dhcp6: no\r\n      addresses:\r\n        - 192.168.133.69\/17     # Private IPv4 address.\r\n        - 139.177.192.228\/24    # Your Linode's public IPv4 address.\r\n      gateway4: 139.177.192.1   # Primary IPv4 gateway.\r\n      nameservers:\r\n        search: [test.local]    # Search domain.\r\n        addresses: [8.8.8.8]    # DNS Server IP addresses.<\/pre>\n<p>For a replication AD-DC:<\/p>\n<pre>network:\r\n  version: 2\r\n  renderer: networkd\r\n  ethernets:\r\n    eth0:\r\n      dhcp4: no\r\n      dhcp6: no\r\n      addresses:\r\n        - 192.168.131.39\/17            # Private IPv4 address.\r\n        - 139.177.196.132\/24           # Your Linode's public IPv4 address.\r\n      gateway4: 139.177.196.1          # Primary IPv4 gateway.\r\n      nameservers:\r\n        search: [test.local]           # Search domain.\r\n        addresses: [<strong>192.168.133.69<\/strong>]    # DNS Server IP addresses.<\/pre>\n<p>Apply:<\/p>\n<pre>sudo netplan apply<\/pre>\n<p>On Linode&#8217;s dashboard, go to <strong>Configurations<\/strong> &gt; <strong>Edit<\/strong> &gt; Disable <strong>Auto-configure networking<\/strong> &gt; <strong>Save Changes<\/strong> for <span style=\"color: #ff0000;\"><strong>both VMs<\/strong><\/span>.\u00a0Then reboot!<\/p>\n<p>Disable IPv6 on <strong>\/etc\/sysctl.conf<\/strong>, append these lines:<\/p>\n<pre>net.ipv6.conf.all.disable_ipv6 = 1\r\nnet.ipv6.conf.default.disable_ipv6 = 1<\/pre>\n<p>Apply and reboot:<\/p>\n<pre>sudo sysctl -p\r\nsudo reboot<\/pre>\n<p>Disable IPv6 also on <strong>\/etc\/default\/grub<\/strong>, adding <strong>ipv6.disable=1<\/strong> like shown:<\/p>\n<pre>GRUB_CMDLINE_LINUX_DEFAULT=\"autoinstall ds=nocloud-net;seedfrom=http:\/\/10.0.2.2:8309\/ net.ifnames=0 <strong>ipv6.disable=1<\/strong>\"\r\nGRUB_CMDLINE_LINUX=\"console=ttyS0,19200n8 net.ifnames=0 <strong>ipv6.disable=1<\/strong>\"<\/pre>\n<p>Apply and reboot:<\/p>\n<pre>sudo update-grub2\r\nsudo reboot<\/pre>\n<p>Check if the DNS servers are configured as needed:<\/p>\n<pre>systemd-resolve --status<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In order to set up an Active Directory \/ Domain Controller on the cloud assigning [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1957","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1957"}],"version-history":[{"count":4,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1957\/revisions"}],"predecessor-version":[{"id":1962,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1957\/revisions\/1962"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}