LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-26-2007, 06:17 AM   #16
karelvdm
Member
 
Registered: Sep 2004
Location: Pietermaritzburg South Africa
Distribution: Home:OpenSuse 11, Office:FreeBSD 7 PBX:Trixbox 2 (CentOS 4.4) Home Automation : LinuxMCE
Posts: 123

Original Poster
Rep: Reputation: 15

Generating new keys didn't work.

Might be a typo somewhere.
 
Old 02-27-2007, 09:32 AM   #17
karelvdm
Member
 
Registered: Sep 2004
Location: Pietermaritzburg South Africa
Distribution: Home:OpenSuse 11, Office:FreeBSD 7 PBX:Trixbox 2 (CentOS 4.4) Home Automation : LinuxMCE
Posts: 123

Original Poster
Rep: Reputation: 15
Some background;

The previous errors was on the suse machine."(Still can't get it right; badkey)
I'm trying this on a SLES10 machine and FreeBSD6 machine.

When running the update file to update to the FreeBSD machine I get the following error;

Code:
tcshq# ./update-dns.sh
Creating key...
Sending update to 172.16.0.70#53
Outgoing update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:  37330
;; flags: ; ZONE: 1, PREREQ: 0, UPDATE: 2, ADDITIONAL: 1
;; ZONE SECTION:
;ddns.mydomain.co.za.                        IN      SOA

;; UPDATE SECTION:
client.ddns.mydomain.co.za.   0       ANY     ANY
client.ddns.mydomain.co.za.   60      IN      A       47.263.150.132

;; TSIG PSEUDOSECTION:
client.ddns.mydomain.co.za.   0       ANY     TSIG    hmac-md5.sig-alg.reg.int. 1172590289 300 16 jyafw36U763hxa0AKkJnmw== 37330 NOERROR 0

; Communication with server failed: timed out

Last edited by karelvdm; 02-27-2007 at 09:33 AM.
 
Old 02-27-2007, 11:05 AM   #18
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Did you compile from source? If you did, the the bind directory there should be a subdirectory bin/checks and named-checkzone and named-checkconf. Checkconf will check the named.conf file and report errors, and checkzone will check the individual zonefile you point it at. That can help, or you could check the logs to see the problem.

If you installed from an rpm on the SLES system I don't know if they include those tools or not.

Peace,
JimBass
 
Old 02-28-2007, 03:47 AM   #19
karelvdm
Member
 
Registered: Sep 2004
Location: Pietermaritzburg South Africa
Distribution: Home:OpenSuse 11, Office:FreeBSD 7 PBX:Trixbox 2 (CentOS 4.4) Home Automation : LinuxMCE
Posts: 123

Original Poster
Rep: Reputation: 15
JimBass,

Thanx for all your patience with me.

I left the SLES box for now and I'm focussing on the FreeBSD box.

named-checkconf returns with no output:
Code:
thunder# /usr/sbin/named-checkconf                                              
thunder#
named-checkzone
Code:
thunder# /usr/sbin/named-checkzone ddns.mydomain.co.za /etc/namedb/dynamic/ddns.mydomain.co.za
zone ddns.mydomain.co.za/IN: has no NS records
thunder#
Could port53 be blocked on the FreeBSD box?
How can I check if it is, and if it is, how can I open it?
 
Old 02-28-2007, 09:18 AM   #20
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
I'm far from a BSD expert, but named-checkzone doesn't check and see if you get an answer for the zone, it simply checks the integrity of the zonefile itself. You must add nameservers to the zonefile, or it won't work. You could do something simple like:

Code:
7200    IN      NS      ns1.ddns.mydomain.co.za.
7200    IN      NS      ns2.ddns.mydomain.co.za.
Then below that identify those names with A records -

Code:
ns1.ddns.mydomain.co.za      IN       A        I.P.Add.Ress
ns2.ddns.mydomain.co.za      IN       A        I.P.Add.Ress
You can even use the same address for both ns1 and ns2, but you have to identify at least 2 nameservers for every zone.

You can use a program like nmap on linux to see what ports are open on the BSD box, and you should be able to compile that on BSD as well I would think. You could also try telnetting to localhost at port 53 on the BSD box to see if the port is open. Given BSD's security features it is entirely possible that port 53 is closed, but I don't know how to open it. It might be a simple firewall script, or it could be something else.

Peace,
JimBass
 
Old 03-07-2007, 04:34 AM   #21
karelvdm
Member
 
Registered: Sep 2004
Location: Pietermaritzburg South Africa
Distribution: Home:OpenSuse 11, Office:FreeBSD 7 PBX:Trixbox 2 (CentOS 4.4) Home Automation : LinuxMCE
Posts: 123

Original Poster
Rep: Reputation: 15
Hi Jimm,

I've found a solution to my problem I had with the timeout when updating.
The freebsd box was listening for port 53 on localhost only.

Code:
thunder# netstat -an -f inet
Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)
tcp4       0     52  172.16.0.70.22         172.16.0.16.50532      ESTABLISHED
tcp4       0      0  127.0.0.1.953          *.*                    LISTEN
tcp4       0      0  127.0.0.1.53           *.*                    LISTEN
tcp4       0      0  127.0.0.1.25           *.*                    LISTEN
tcp4       0      0  *.22                   *.*                    LISTEN
udp4     172      0  *.53                   *.*
udp4       0      0  127.0.0.1.53           *.*
udp4       0      0  *.514                  *.*
thunder#
But I got it right in the end.

Code:
thunder# netstat -an -f inet
Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)
tcp4       0     52  172.16.0.70.22         172.16.0.16.50532      ESTABLISHED
tcp4       0      0  127.0.0.1.953          *.*                    LISTEN
tcp4       0      0  172.16.0.70.53         *.*                    LISTEN
tcp4       0      0  127.0.0.1.25           *.*                    LISTEN
tcp4       0      0  *.22                   *.*                    LISTEN
udp4       0      0  *.53                   *.*
udp4       0      0  172.16.0.70.53         *.*
udp4       0      0  *.514                  *.*
thunder#
Now I'm back to square one....badkey.....what am I doing wrong?
Code:
client# ./update-dns.sh
Creating key...
Sending update to mydnsserver#53
Outgoing update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:  19477
;; flags: ; ZONE: 1, PREREQ: 0, UPDATE: 2, ADDITIONAL: 1
;; ZONE SECTION:
;ddns.mydomain.co.za.                        IN      SOA

;; UPDATE SECTION:
client.ddns.mydomain.co.za.   0       ANY     ANY
client.ddns.mydomain.co.za.   60      IN      A       47.263.115.232

;; TSIG PSEUDOSECTION:
client.ddns.mydomain.co.za.   0       ANY     TSIG    hmac-md5.sig-alg.reg.int. 1172645392 300 16 6WY0bbDTzCUdcy9Aum9CTQ== 19477 NOERROR 0

; TSIG error with server: tsig indicates error

Reply from update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOTAUTH, id:  18462
;; flags: qr ra ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 1
;; TSIG PSEUDOSECTION:
client.ddns.mydomain.co.za.   0       ANY     TSIG    hmac-md5.sig-alg.reg.int. 1173170814 300 0  18462 BADKEY 0


client#
Let me know what info u need.
Thanx again!

Last edited by karelvdm; 03-07-2007 at 04:39 AM.
 
Old 03-07-2007, 09:18 AM   #22
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
I don't have the exact problem, but the output seems likely to point to the problem -
Quote:
client# ./update-dns.sh
Creating key...
The script shouldn't be generating the key, it should just use the key that already exists. I suspect something inside of update-dns.sh needs to be changed. Since the key needs to match both on the client machine and the DNS server, generating a new key is sure to fail.

Peace,
JimBass
 
Old 03-07-2007, 09:19 AM   #23
karelvdm
Member
 
Registered: Sep 2004
Location: Pietermaritzburg South Africa
Distribution: Home:OpenSuse 11, Office:FreeBSD 7 PBX:Trixbox 2 (CentOS 4.4) Home Automation : LinuxMCE
Posts: 123

Original Poster
Rep: Reputation: 15
Hi

Log file on nameserver
Code:
Mar  7 17:17:51 thunder named[360]: client 172.16.0.245#58217: request has invalid signature: TSIG tcshq.ddns.cos.co.za: tsig verify failure (BADKEY)
Should I copy the contents of the ".key" file or ".private" to the nameserver's named.conf file?

Last edited by karelvdm; 03-07-2007 at 09:21 AM.
 
Old 03-07-2007, 09:24 AM   #24
karelvdm
Member
 
Registered: Sep 2004
Location: Pietermaritzburg South Africa
Distribution: Home:OpenSuse 11, Office:FreeBSD 7 PBX:Trixbox 2 (CentOS 4.4) Home Automation : LinuxMCE
Posts: 123

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by JimBass
The script shouldn't be generating the key, it should just use the key that already exists. I suspect something inside of update-dns.sh needs to be changed.
This is the script file
Code:
#!/bin/sh

NAME="tcshq.ddns.cos.co.za"
TTL="60"
IP=`/sbin/ifconfig | /usr/bin/grep -A1 tun0 | /usr/bin/grep inet | /usr/bin/cut
-f 2 -d " "`

        /usr/bin/nsupdate -d -k /root/utils/Ktcshq.ddns.cos.co.za.+157+63975.key
 <<EOF

server 172.16.0.70
zone ddns.cos.co.za
update delete $NAME
update add $NAME 60 A $IP

EOF
 
Old 03-07-2007, 09:26 AM   #25
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Yeah, that sounds like exactly what I described. It is using a bad key. Check out this page in the answers section that deals with linking dhcp and ddns together.

http://www.linuxquestions.org/linux/...em_DDNS_Server

Check the part about the key, you can simply put the key somewhere and call to it in the updater script.

Peace,
JimBass
 
Old 03-07-2007, 09:44 AM   #26
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
The script looks okay, but obviously it isn't working. What happens if you run not the script itself, but the contents of it line by line?

Peace,
JimBass
 
Old 03-14-2007, 05:46 AM   #27
karelvdm
Member
 
Registered: Sep 2004
Location: Pietermaritzburg South Africa
Distribution: Home:OpenSuse 11, Office:FreeBSD 7 PBX:Trixbox 2 (CentOS 4.4) Home Automation : LinuxMCE
Posts: 123

Original Poster
Rep: Reputation: 15
Hey Jimm

Sorry for the delay, but was a bit busy.
Got my keys sorted! Something small....changed the key entry in the named.conf from
Code:
key client.ddns.mydomain.co.za {
	algorithm "HMAC-MD5";
	secret "mysecret";
	};
to
Code:
key client.ddns.mydomain.co.za {
	algorithm hmac-md5;
	secret "mysecret";
	};
Now if I run the update file,
Code:
client# ./update-dns.sh
Creating key...
Sending update to 172.16.0.70#53
Outgoing update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:  28250
;; flags: ; ZONE: 1, PREREQ: 0, UPDATE: 2, ADDITIONAL: 1
;; ZONE SECTION:
;ddns.mydomain.co.za.                        IN      SOA

;; UPDATE SECTION:
client.ddns.cos.co.za.   0       ANY     ANY
client.ddns.cos.co.za.   60      IN      A       47.269.242.123

;; TSIG PSEUDOSECTION:
client.ddns.cos.co.za.   0       ANY     TSIG    hmac-md5.sig-alg.reg.int. 1173867849 300 16 kkl+6JVsfCnKPqXXFqT+QQ== 28250 NOERROR 0


Reply from update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:  28250
;; flags: qr ra ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 1
;; TSIG PSEUDOSECTION:
client.ddns.cos.co.za.   0       ANY     TSIG    hmac-md5.sig-alg.reg.int. 1173867947 300 16 1oqfo+uMeYOiFGqUoN3jUg== 28250 NOERROR 0

client#
Doesn't seem to update the zone file.

Last edited by karelvdm; 03-14-2007 at 05:51 AM.
 
Old 03-14-2007, 09:48 AM   #28
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Yeah, case sensitivity can be a pain. Check the BIND logs. You'll probably see something about lack of permissions for the zone file. In any case, there should be some error logged to the logs. Syslog if nothing else, but any BIND logging should have it.

Peace,
JimBass
 
Old 03-15-2007, 05:36 AM   #29
karelvdm
Member
 
Registered: Sep 2004
Location: Pietermaritzburg South Africa
Distribution: Home:OpenSuse 11, Office:FreeBSD 7 PBX:Trixbox 2 (CentOS 4.4) Home Automation : LinuxMCE
Posts: 123

Original Poster
Rep: Reputation: 15
Hi Jimm

NO errors, No update in the zone file,
but the *.jnl gets created.

Code:
thunder# ls -al
total 12
drwxr-xr-x  2 bind  wheel  512 Mar 15 12:32 .
drwxr-xr-x  6 root  wheel  512 Mar 14 13:31 ..
-rw-r--r--  1 bind  wheel  346 Mar 15 12:29 ddns.mydomain.co.za
-rw-r--r--  1 bind  wheel  788 Mar 15 12:32 ddns.mydomain.co.za.jnl
Any ideas.
 
Old 03-18-2007, 02:20 PM   #30
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Not without more info. Set BIND to log everything in named.conf, and check them. It can't just not work and not have a reason. Is rndc installed and functional?

I'm out of town at the moment, but please log and post here, or put up a link to the log files and I'll check them out when I can.

Peace,
JimBass
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
External DDNS server setup worldgnat Linux - Networking 10 02-26-2007 08:55 AM
How to update Windows DDNS server by Linux DHCP server Zebrastreifen Linux - Networking 1 08-02-2006 05:19 PM
HOWTO: Setup RH FC3, Sendmail, Procmail with ADSL & DDNS dvwyngaa Linux - Networking 0 06-17-2005 06:35 AM
Postfix Mail Server on DDNS azmadar Linux - Networking 0 11-25-2004 03:50 AM
BIND9.2.2 DDNS Server NUX Linux - Networking 3 08-29-2003 01:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration