Help - Search - Members - Calendar
Full Version: HOW TO: own dns for your reseller (ENSIM 3.1x))
The Planet Forums > Control Panels > Ensim > Ensim HOWTOs
Matt_01
This is a easy way how to give your reseller own DNS

THIS HOW TO WORKS FOR ENSIM PRO 3.X -10.X

Im using
ns1.reseller.com with the ip 64.246.1.1 and
ns2.reseller.com with the ip 64.246.1.2 as an example

first of all, request two IPs from rackshack..
Login to your ensim and add a reseller.. if u already have the reseller add'd.. no worrys.. ;-)

Login to your server as root and type:

/sbin/applifconfig alias 64.246.1.1
and
/sbin/applifconfig alias 64.246.1.2
(make sure you are using the real IPs of your reseller.. and not my example Ips ;-)) )

next thing we have to do is edit the options.conf.wp file and add the reseller IPs
type:

pico /etc/bind/options.conf.wp

and change this line
listen-on { 127.0.0.1;YOURSERVERIP; };
to
listen-on { 127.0.0.1; YOURSERVERIP; 64.246.1.1; 64.246.1.2; };
(again, make sure to use your reseller IPs and not my example IPs.. )

save end exit pico ( CTRL + X, Y and ENTER)
now.. type:

pico /var/named/virtualDNS
and add this 2 lines on that small file

ns1.reseller.com 64.246.1.1
ns2.reseller.com 64.246.1.2

(again, make sure to use your reseller Ips/Domain and not my example Ip/Domain.. )
save end exit pico ( CTRL + X, Y and ENTER)

Now we have to BIND the Ips into your servcer
type:
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:1

then:
pico -w /etc/sysconfig/network-scripts/ifcfg-eth0:1
and change the following lines

DEVICE="eth0" to DEVICE="eth0:1"
and
IPADDR="SERVER_IP" to IPADDR="64.246.1.1" ( ns1 IP of your reseller)

save end exit pico ,same thing for ns2..

cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:2

change DEVICE="eth0" to DEVICE="eth0:2"
and
IPADDR="SERVER_IP" to IPADDR="64.246.1.2" ( ns2 ip of your resller)

now type:
ifup eth0:1
and
ifup eth0:2

restart bind with
/etc/rc.d/init.d/named restart

now Login to ensim and click on "BIND" then to "Zone List" click on the reseller.com domain ( reseller domain= the domain u like to setup Reseller dns)

click on the drop down and choose "Add Address (A) Record"

on "Hostname.domain" type in ns1
on "IP Address" the resller ips of ns1 (64.246.1.1)

click on "add" (u will get a error.. but no worrys about that.. )

do the same for your ns2
..."Add Address (A) Record"

on "Hostname.domain" type in ns2
on "IP Address" the resller ips of ns2 (64.246.1.2)

and add it ( no worrys about the error)

now on the drop down choose "Add Name Server (NS) Record"
on "Name server" type in “ns1.reseller.com”

add it and do the same for ns2..
...drop down choose "Add Name Server (NS) Record"
on "Name server" type in “ns2.reseller.com”

now register the Ips for ns1.reseller.com/ns2.reseller.com on your Register..
wait a day or two for your nameserver to propagate around the web



Use the dig command to see when the ips/DNS is working..
type:
dig reseller.com
u sould see something like this

[root@ensim /root]# dig reseller.com

;; QUESTION SECTION:
;reseller.com. IN A

;; ANSWER SECTION:
reseller.com. 37661 IN A YOURSERVERIP

;; AUTHORITY SECTION:
reseller.com. 37661 IN NS ns1.reseller.com.
reseller.com. 37661 IN NS ns2.reseller.com.

;; ADDITIONAL SECTION:
ns1.reseller.com. 37661 IN A 64.246.1.1
ns2.reseller.com. 37661 IN A 64.246.1.2


Hope this how to helps
Matt

P.S: What u could do is share your Ips( ns1 and ns2 of your own dns) with your reseller..
Just add two a records and two ns records on his domain and let him register the same dns ips ( same ips as your ns1 and ns2 ips).. this works also...
cmafia
Even easier way....

Go to this thread on my forum and check it out!

http://www.darksidehosting.com/forum/viewt...pic.php?p=49#49

Cajun
cool.gif
mbennett
QUOTE
P.S: What u could do is share your Ips( ns1 and ns2 of your own dns) with your reseller..



he already said that
Matt_01
I updated the how to.. forgot to bind the Ips @this how to..
sorry
xzx
QUOTE
Originally posted by Matt_01
This is a easy way how to give your reseller own DNS

Im using  
ns1.reseller.com with the ip 64.246.1.1 and
ns2.reseller.com with the ip 64.246.1.2 as an example

first of all, request two  IPs from rackshack..
Login to your ensim and add a reseller.. if u already have the reseller add'd.. no worrys.. ;-)  

Login to your server as root and type:

[B]/sbin/applifconfig alias 64.246.1.1

and
/sbin/applifconfig alias 64.246.1.2
(make sure you are using the real IPs of your reseller.. and not my example Ips ;-)) )

next thing we have to do is edit the options.conf.wp file and add the reseller IPs
type:

pico /etc/bind/options.conf.wp

and change this line
listen-on { 127.0.0.1;YOURSERVERIP; };
to
listen-on { 127.0.0.1;  YOURSERVERIP;  64.246.1.1; 64.246.1.2; };
(again, make sure to use your reseller IPs and not my example IPs.. )

save end exit pico ( CTRL + X,  Y and ENTER)
now.. type:

pico /var/named/virtualDNS
and add this 2 lines on that small file

ns1.reseller.com 64.246.1.1
ns2.reseller.com 64.246.1.2

(again, make sure to use your reseller Ips/Domain and not my example Ip/Domain.. )
save end exit pico ( CTRL + X,  Y and ENTER)

Now we have to BIND the Ips into your servcer  
type:  
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:1

then:
pico -w /etc/sysconfig/network-scripts/ifcfg-eth0:1
and change the following lines

DEVICE="eth0"              to     DEVICE="eth0:1"
and  
IPADDR="SERVER_IP"     to    IPADDR="64.246.1.1"  ( ns1 IP of your reseller)

save end exit pico ,same thing for ns2..  

cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:2

change DEVICE="eth0"              to     DEVICE="eth0:2"
and  
IPADDR="SERVER_IP"     to    IPADDR="64.246.1.2" ( ns2 ip of your resller)

now type:  
ifup eth0:1
and
ifup eth0:2

restart bind with
/etc/rc.d/init.d/named restart

now Login to ensim and click on "BIND" then to "Zone List" click on the reseller.com domain ( reseller domain= the domain u like to setup Reseller dns)

click on the drop down and choose "Add Address (A) Record"

on "Hostname.domain"  type in ns1
on "IP Address" the resller ips of ns1 (64.246.1.1)

click on "add"  (u will get a error.. but no worrys about that.. )

do the same for your ns2
..."Add Address (A) Record"

on "Hostname.domain"  type in ns2
on "IP Address" the resller ips of ns2 (64.246.1.2)

and add it ( no worrys about the error)

now on the drop down choose "Add Name Server (NS) Record"
on "Name server" type in “ns1.reseller.com”

add it and do the same for ns2..
...drop down choose "Add Name Server (NS) Record"
on "Name server" type in “ns2.reseller.com”

now register the Ips for ns1.reseller.com/ns2.reseller.com on your Register..
wait a day or two for your nameserver to propagate around the web



Use the dig command to see when the ips/DNS is working..
type:
dig reseller.com  
u sould see something like this

[root@ensim /root]# dig reseller.com

;; QUESTION SECTION:
;reseller.com.                      IN      A

;; ANSWER SECTION:
reseller.com.               37661   IN      A       YOURSERVERIP

;; AUTHORITY SECTION:
reseller.com.               37661   IN      NS      ns1.reseller.com.
reseller.com.               37661   IN      NS      ns2.reseller.com.

;; ADDITIONAL SECTION:
ns1.reseller.com.        37661   IN      A       64.246.1.1  
ns2.reseller.com.        37661   IN      A       64.246.1.2


Hope this how to helps
Matt

P.S: What u could do is share your Ips( ns1 and ns2 of your own dns)  with your reseller..
Just add two a records and two ns records on his domain and let him register the same dns ips ( same ips as your ns1 and ns2 ips).. this works also... [/B]



uh, i did this, and it worked, yet it messed up my unlimited subdomains. I followed the tutorial that someone wrote on how to set up subdomains through creating a user account and that user account was the subdomain. It doesn't work any more, is there any way you know of i can fix this?
Matt_01
can u past me the link to that subdomain how to ?
xzx
QUOTE
Originally posted by Matt_01
can u past me the link to that subdomain how to ?



This is the tweak i used for the subdomains:


//HOWTO: Customize Subdomains


Do the following with the zip file.
1. Extract and put the apache.py file in /usr/lib/python2.1/site-packages/vh3/custom.

2. Restart Webappliance.
/etc/rc.d/init.d/webppliance restart

3. Stop Bind. Enable wildcards. Edit the db file for the domain you want to enable subdomains on. if the domain is foo.com then :

cd /var/named
pico db.foo.com

Add :

* A 64.246.65.454 (this is just an example of ip address)

Save the file. Ctrl + X.
Start Bind.

4. Edit the site for which you want to enable subdomains.
Or give the following command.

EditVirtDomain foo.com

5. Restart apache
/etc/rc.d/init.d/httpd restart.

6. login as the site admin for foo.com and create a new user.

then go to user.foo.com

Done!

For sub.domain.com pointed to domain.com/sub.domain.com, use the code which hunter posted. Sames steps. Only change step 6.

Instead of loggin into control panel and creating a user, login into ftp and create a folder under mainwebsite_html as sub.foo.com.

Thats all




And this is the code for apache.py file:

import virthost
def add_custom_directives(site, newconf, oldconf, cust):
content = """
ServerAlias *.%s
RewriteEngine On
RewriteCond %%{HTTP_HOST} !%s [NC]
RewriteCond %%{HTTP_HOST} (.*).%s [NC]
RewriteRule ^/(.*)$ %s/home/%%1/public_html/$1 [L]
""" % (newconf['siteinfo']['domain'], newconf['apache']['webserver'],
newconf['siteinfo']['domain'], virthost.domainfs_path(site))
return content



I redid this subdomain hack last night but my subdomains are still broken. What can i do to fix it?
xzx
ok, it's good now, I just did the same thing that i did for the new nameservers to the old ones and volia!
Matt_01
so everything is working now ?
Silverlime
How many times can I perform this HOWTO (creating DNS for multiple resellers)? And, do I need to change anything?
Matt_01
QUOTE
Originally posted by Silverlime
How many times can I perform this HOWTO (creating DNS for multiple resellers)?  And, do I need to change anything?


no limits ;-)) no changes ;-)
Silverlime
If I already had the site set up with two NS records of my own in their Bind DNS Zone, do I delete those before adding the two custom reseller DNS NS records?
Matt_01
later on yes.. but first follow my how to.. and later on, if the reseller dns works, U can del the 2 NS records
wiseaxis
is there a limt to do this.i mean can i setup 2 different reseller dns
Matt_01
QUOTE
Originally posted by wiseaxis
is there a limt to do this.i mean can i setup 2 different reseller dns


only limit is the Max. 32 ip's per server by rackshack.. ;-)
ISVY
is that How to is for one reseller or all reseller if i add new reseller what step should i do
Painter
QUOTE
now Login to ensim and click on "BIND" then to "Zone List" click on the reseller.com domain ( reseller domain= the domain u like to setup Reseller dns)


In Zone List I have
"No editable zones on this Appliance."
Any idea?
Bandit
Ok, I performed this howto and am having a small issue.

I have IP 1.1.1.1 and 2.2.2.2 and my server is fine.

I requested 2 additional IPs for a reseller to have his own DNS. I created the reseller and his first site for him and created it as a IP based site so he could use SSL. I set it up on IP 3.3.3.3.

Then I performed the howto and used 3.3.3.3 and 4.4.4.4 as the reseller IPs. He then created a site under his reseller account and when we try and go to the URL instead of opening the default ensim page for sites, it opens the site administrator link instead. The name based site he created is pointed to the IP of 1.1.1.1

Any ideas?
Matt_01
QUOTE
Originally posted by Bandit
Ok, I performed this howto and am having a small issue.

I have IP 1.1.1.1 and 2.2.2.2 and my server is fine.

I requested 2 additional IPs for a reseller to have his own DNS.  I created the reseller and his first site for him and created it as a IP based site so he could use SSL.  I set it up on IP 3.3.3.3.

Then I performed the howto and used 3.3.3.3 and 4.4.4.4 as the reseller IPs.  He then created a site under his reseller account and when we try and go to the URL instead of opening the default ensim page for sites, it opens the site administrator link instead.  The name based site he created is pointed to the IP of 1.1.1.1

Any ideas?


So..his reseller account is on ip 3.3.3.3 as Ip based ?
Now he's creating a site with that account and it will give you the login infos and not the welcome page ? or am I wrong ?
Painter
this message is Ok?


[root@secure sbin]# ifup eth0:1
RTNETLINK answers: File exists

[root@secure sbin]# ifup eth0:2
RTNETLINK answers: File exists

Thanks
Matt_01
QUOTE
Originally posted by Painter
this message is Ok?


[root@secure sbin]# ifup eth0:1
RTNETLINK answers: File exists

[root@secure sbin]# ifup eth0:2
RTNETLINK answers: File exists

Thanks

yep ;-)
tvn
hi all:

QUOTE
Originally posted by Matt_01
...
pico /var/named/virtualDNS
and add this 2 lines on that small file
...
restart bind with
/etc/rc.d/init.d/named restart
...


i follow all steps, but each time i run /etc/rc.d/init.d/named restart so delete added lines on /var/named/virtualDNS. can you help me? TKS. regards :-)
Matt_01
FYI:

I have also tested this HowTo on Ensim 4.X and on 10.x
Works fine!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.