Adding New IP Owned by "Server" and using it for DNS for all users

selim

Verified User
Joined
Jun 4, 2011
Messages
57
Hello
I have searched from but I could not find solution. I might search wrong terms, if there is already a solution to this, please reply with forum link.

I installed directadmin with one IP address.
Later I bought another IP address from server provider, and added it to server via Directadmin.

I used this info from the forum : HOWTO: Setup your nameservers (Real Beginners Guide)

I also checked ifconfig on SSH, and it shows both IP addresses.
I also updated /etc/named.conf and /etc/resolv.conf with my IP addresses according to the how to guide.

Problem: ns2.domain.com is not working, and I can't access directadmin via newip:2222.
And if I browse http://firstip > Apache functioning normally. http://newip > do not resolve

Websites are working and loading from firstip, but I think I could not setup newip correctly. And I think this is because when I added new IP, it was not owned by "server", it was free and I assigned it to "admin" user, and created name servers without problem. But I think if I can assign the new ip to "server" so the ip may be shared with all users on the server? and I may access directadmin from newip too?

I know something is wrong but I don't know what it is.
 
Have you tryed to restart network?

The problem is not the one you think it is, that IP is not responding, are you able to ping it?

Provide us the IP would be better.

Regards
 
Hello,

I installed directadmin with one IP address.
Later I bought another IP address from server provider, and added it to server via Directadmin.

Is your server a OpenVZ/Virtuozzo based VPS? If yes, then you should add your new IP through a VPS control panel (that is not Directadmin).

Does your second IP belong to the same subnet? How does your ifconfig output look like?
 
Have you tryed to restart network?

The problem is not the one you think it is, that IP is not responding, are you able to ping it?

Provide us the IP would be better.

Regards

The address is 31.210.52.174
Now it tools ping, and I can access directadmin through this ip, I can ping name server url for this IP.

And after a restart of server, the name server (named) did not restart. I just comment out some lines on /etc/named.conf and it restarted. My current named.conf content is


Code:
  memstatistics-file "/var/named/data/named_mem_stats.txt";


        //allow-query     { localhost; };
        //recursion yes;
//allow-recursion { trusted; };
//allow-transfer { trusted; };
//allow-notify { trusted; };

        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;

        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
        type hint;
        file "named.ca";
};

include "/etc/named.rfc1912.zones";

zone "da.onapp.com" { type master; file "/var/named/da.onapp.com.db"; };
… list of domains.


And now I just added those lines with correct ip addresses and tried to restart named and it restarted without problem.

Code:
listen-on port 53 { 127.0.0.1; };
listen-on port 53 { 83.45.0.1; };
listen-on port 53 { 83.45.0.2; };

When I checked with inttodns.com , I got this error:

DNS servers responded ERROR: One or more of your nameservers did not respond:
The ones that did not respond are:
31.210.52.174
 
Hello,



Is your server a OpenVZ/Virtuozzo based VPS? If yes, then you should add your new IP through a VPS control panel (that is not Directadmin).

Does your second IP belong to the same subnet? How does your ifconfig output look like?

It is Zen based cloud service. They added it to server, so I could add it through Directadmin. And it is belong to same subnet. I'm pasting my ifconfig.

Code:
eth0      Link encap:Ethernet  HWaddr 00:16:3E:E0:09:6A  
          inet addr:31.210.54.201  Bcast:31.210.54.255  Mask:255.255.255.0
          inet6 addr: fe80::216:3eff:fee0:96a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:851828 errors:0 dropped:0 overruns:0 frame:0
          TX packets:187087 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:65203324 (62.1 MiB)  TX bytes:180643727 (172.2 MiB)
          Interrupt:15 

eth0:0    Link encap:Ethernet  HWaddr 00:16:3E:E0:09:6A  
          inet addr:31.210.52.174  Bcast:31.210.52.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:15 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:10810 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10810 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1152987 (1.0 MiB)  TX bytes:1152987 (1.0 MiB)
 
As additional info, I used pre-created image of CentOs 6.3 & Directadmin. I updated Centos with yum, later I figured out (because of warning messages on directadmin) ftp service did not started on server, I just installed it through directadmin custom build 2.0. And ftp works.
 
I guess you should replace IPs 83.45.0.1 and 83.45.0.2 with your IPs 31.210.54.201 and 31.210.52.174

Code:
listen-on port 53 { 83.45.0.1; };
listen-on port 53 { 83.45.0.2; };

p.s. 31.210.52.174 does not belong to 31.210.54.201/24 subnet by the way. Since the both respond to ping it does not matter now.
 
Back
Top