{"id":639,"date":"2012-10-08T13:04:56","date_gmt":"2012-10-08T13:04:56","guid":{"rendered":"http:\/\/www.plugged.in\/?p=639"},"modified":"2012-10-08T13:04:56","modified_gmt":"2012-10-08T13:04:56","slug":"adding-new-ip-to-directadmin-from-different-subnet-and-gateway","status":"publish","type":"post","link":"https:\/\/www.veriteknik.net.tr\/en\/adding-new-ip-to-directadmin-from-different-subnet-and-gateway\/","title":{"rendered":"Adding New IP to DirectAdmin From Different Subnet and Gateway"},"content":{"rendered":"<p>Earlier I&#8217;ve posted an <a title=\"Bind Multiple IP Addresses on a Single Network Card IPv4 &amp; IPv6\" href=\"http:\/\/www.plugged.in\/linux\/bind-multiple-ip-addresses-on-a-single-network-card.html\">article<\/a> describing how to add multiple ip addresses on a single network device.<\/p>\n<p>Even though you can add IP addresses on Direct Admin using it&#8217;s GUI, unfortunately the GUI fails if the netmask or the gateway is different. So if you have a server running Direct Admin with the IP address 10.10.10.5 and you want to add a new IP address like 192.168.16.7 then you&#8217;ll run into some problems.<\/p>\n<p>To deal with it, we can add the IP&#8217;s manually. You can either add the IP&#8217;s to a new device, or an alias to a present device.<\/p>\n<p>Let&#8217;s first learn what device we&#8217;re using.<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">ifconfig<\/pre>\n<p>This will probably return something like &#8220;eth0&#8221; which is he device.<br \/>\nIf you&#8217;d like to add your new IP as an alias to this one, simple create the file below:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">vi \/etc\/sysconfig\/network-scripts\/ifcfg-eth0:1<\/pre>\n<pre class=\"brush: text; gutter: true; first-line: 1\">DEVICE=eth0:1\nBOOTPROTO=none\nONBOOT=yes\nIPADDR=192.168.10.7\nNETMASK=255.255.255.248<\/pre>\n<p>Note that there&#8217;s no Gateway specified here, so if you&#8217;d like to add an IP address with a different gateway, create the file below (with your own settings ofcouse)<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">vi \/etc\/sysconfig\/network-scripts\/ifcfg-eth1<\/pre>\n<pre class=\"brush: text; gutter: true; first-line: 1\">DEVICE=eth1\nBOOTPROTO=static\nONBOOT=yes\nHWADDR=AA:BB:CC:DD:EE:FF\nIPADDR=192.168.10.7\nNETMASK=255.255.255.248\nGATEWAY=192.168.10.1<\/pre>\n<p>After this, just restart your network service. (Don&#8217;t forget that if you do anything wrong, you probably won&#8217;t be able to reach your server over network)<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">service network restart<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Earlier I&#8217;ve posted an article describing how to add multiple ip addresses on a single network device. Even though you can add IP addresses on Direct Admin using it&#8217;s GUI, unfortunately the GUI fails if the netmask or the gateway is different. So if you have a server running Direct Admin with the IP address [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[461,370,386],"tags":[543],"yst_prominent_words":[911,930,932,935,671,924,928,931,926,605,929,933,908,839,925,934,148,927,337],"class_list":["post-639","post","type-post","status-publish","format-standard","hentry","category-directadmin-linux","category-linux","category-network","tag-directadmin-ip-gateway"],"jetpack_featured_media_url":"","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Mustafa Emre Ayd\u0131n","author_link":"https:\/\/www.veriteknik.net.tr\/en\/author\/eaydin\/"},"uagb_comment_info":0,"uagb_excerpt":"Earlier I&#8217;ve posted an article describing how to add multiple ip addresses on a single network device. Even though you can add IP addresses on Direct Admin using it&#8217;s GUI, unfortunately the GUI fails if the netmask or the gateway is different. So if you have a server running Direct Admin with the IP address&hellip;","_links":{"self":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/comments?post=639"}],"version-history":[{"count":1,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/639\/revisions"}],"predecessor-version":[{"id":7776,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/639\/revisions\/7776"}],"wp:attachment":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/media?parent=639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/categories?post=639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/tags?post=639"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/yst_prominent_words?post=639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}