Archive for December, 2005

Adding DNS Entry with /scripts/adddns

Today a client told his domain is not working after server move.

I have checked the domain on new server, found it is setup on Apache configuration file

/usr/local/apache/conf/httpd.conf

So i checked if DNS server resolves this domain. DNS server is not resolving this domain, so i added DNS entry for the domain with cpanel adddns script.

# /scripts/adddns
Add Dns 1.0 …
Warning, this only adds dns to the local server …
If this server is not the dns master, this will not work
Enter ip? 65.75.183.50
Enter the new domain? dedicatedsupport.info
Setup dedicatedsupport.info OK
#

Comments off

Restarting Network

On Linux, you can restart network service with command

# service network restart

Similar command is available for FreeBSD, but is less used/known.

The command is /etc/netstart

freebsd# /etc/netstart
hw.bus.devctl_disable: 1 -> 1
lo0: flags=8049 mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0×3
inet 127.0.0.1 netmask 0xff000000
dhclient already running? (pid=238).
route: writing to routing socket: File exists
add net ::ffff:0.0.0.0: gateway ::1: File exists
route: writing to routing socket: File exists
add net ::0.0.0.0: gateway ::1: File exists
net.inet6.ip6.forwarding: 0 -> 0
net.inet6.ip6.accept_rtadv: 1 -> 1
route: writing to routing socket: File exists
add net fe80::: gateway ::1: File exists
route: writing to routing socket: File exists
add net ff02::: gateway ::1: File exists
IPv4 mapped IPv6 address support=NO
freebsd#

Comments off

FreeBSD DHCP Lease

To assign IP from DHCP for your network card on FreeBSD, add following line to /etc/rc.conf

ifconfig_lnc0=”DHCP”

You can see current lease info at

/var/db/dhclient.leases

freebsd# cat /var/db/dhclient.leases
lease {
interface “lnc0″;
fixed-address 192.168.199.128;
option subnet-mask 255.255.255.0;
option dhcp-lease-time 1800;
option routers 192.168.199.2;
option dhcp-message-type 5;
option dhcp-server-identifier 192.168.199.254;
option domain-name-servers 192.168.199.2;
option broadcast-address 192.168.199.255;
option domain-name “localdomain”;
renew 6 2005/12/24 09:33:15;
rebind 6 2005/12/24 09:46:02;
expire 6 2005/12/24 09:49:47;
}
freebsd#

Comments (1)

Wired DNS Problem

One of the site hosted on my server stoped working with “www”
I have checked it with nslookup within the server. It fails for “www”

[root@server10 named]# nslookup
> server localhost
Default server: localhost
Address: 127.0.0.1#53
> www.infodon.com
Server: localhost
Address: 127.0.0.1#53

** server can’t find www.infodon.com: SERVFAIL
>

I have checked the DNS entry at /var/named/infodon.com.db and found it proper.

# cat /var/named/infodon.com.db
; Modified by Web Host Manager
; Zone File for infodon.com
$TTL 14400
@ 14440 IN SOA dns10.hosthat.com. flashweb.asianetonline.net. (
2005092014
14400
7200
3600000
86400
)

infodon.com. 14400 IN NS dns10.hosthat.com.
infodon.com. 14400 IN NS dns11.hosthat.com.

infodon.com. 14400 IN A 65.98.61.140

localhost.infodon.com. 14400 IN A 127.0.0.1

infodon.com. 14400 IN MX 0 infodon.com.

mail 14400 IN CNAME infodon.com.
ftp 14400 IN A 65.98.61.140
billing 14400 IN A 65.98.61.140
www.billing 14400 IN A 65.98.61.140
flash 14400 IN A 65.98.61.140
www.flash 14400 IN A 65.98.61.140
free 14400 IN A 65.98.61.140
www.free 14400 IN A 65.98.61.140
helpdesk 14400 IN A 65.98.61.140
www.helpdesk 14400 IN A 65.98.61.140
templates 14400 IN A 65.98.61.140
www.templates 14400 IN A 65.98.61.140
domain 1440 IN CNAME 66917.myorderbox.com.
* 14400 IN A 65.98.61.140
www 14400 IN A 65.98.61.140
[root@server10 named]#

Still nslookup do not work, at last found the client have added a domain www.infodon.com and removed its A Record.

[root@server10 named]# ls -l|grep infod
-rw-r–r– 1 named named 927 Dec 23 00:33 infodon.com.db
-rw-r–r– 1 named named 559 Dec 21 18:56 www.infodon.com.db
[root@server10 named]# cat www.infodon.com.db
; cPanel 10
; Zone file for www.infodon.com
$TTL 86400
@ IN SOA dns10.hosthat.com. hostonnet.gmail.com. ( 2005122102 ; serial, todays date+todays
14400 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, seconds

www.infodon.com. IN NS dns10.hosthat.com.
www.infodon.com. IN NS dns11.hosthat.com.

www.infodon.com. IN A

localhost.www.infodon.com. IN A 127.0.0.1

www.infodon.com. IN MX 0 www.infodon.com.

mail IN CNAME www.infodon.com.
www IN CNAME www.infodon.com.
ftp IN CNAME www.infodon.com.
[root@server10 named]#

Problem is solved by deleting the DNS Zone

/var/named/www.infodon.com.db

and its entry from

/etc/named.conf

Comments (1)

« Previous entries · Next entries »