LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-11-2007, 09:39 AM   #1
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

Rep: Reputation: 15
External ddns server setup


Hi Guys,

I need some help AGAIN

I need to setup an external ddns server.
Where do I start and what do I need?

Got a registered domain my-company.net
Using SLES 10.

Thanx in advance
 
Old 01-11-2007, 03:11 PM   #2
nirmaltom
Member
 
Registered: Jun 2005
Location: India
Distribution: Redhat,Fedora,DSL,Ubuntu
Posts: 238

Rep: Reputation: 30
hi,

i didnt get it correct,but to my knowledege we need a software like ddclient to update ip information in the server
dyndns.com have a reference page of using this perl package
regards
Tom.
 
Old 01-12-2007, 07:05 AM   #3
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 Nirmaltom,

Thanx!!! It worked for now. That is a temporary solution to my problem.

Let me be more descriptive:

I've got several FreeBSD vpn boxes at clients.
All of them connect to the internet via adsl.
The isp assigns random ip's to the FreeBSD pc's (41.241.11.119 - not actual ip)
I created a user account for each of the FreeBSD pc's.
They login to the mail server with cron jobs and fetchmail on a regular basis. So if one of the FreeBSD pc's gets a new ip assigned to them I'm able to check the log file on the mail server to see from wich ip that specific Freebsd pc logged in from.

I want to set up my own server to assign ip's to my several FreeBSD pc's. I assume a ddns server is the way to go.

If anyone has some pointers for me, it will be greatly appreciated!

Ps: I'll be out of the office for a week.

Thanx guys!!!
 
Old 01-24-2007, 09:28 AM   #4
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
I'm back,

I've got a registered domain,
Would a dns server with a static ip and dhcp be the why to go?
 
Old 01-24-2007, 10:26 AM   #5
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
I feel you are not describing what the problem is here. So you have a mail server, and you have freeBSD boxes that connect to it. The address of these servers change, but so what? They're connected to the net, and can reach your mail server, then what is the problem?

If you always need to know the IP of these remote boxes, why not use the aforementioned cron to have them sign into the mail server every 5 minutes? That way you always have their IP address, and you should be able to connect to them.

DHCP wouldn't server any purpose. You could assign an address to the VPN clients, but don't they already have a LAN address through the VPN?

I'm not making much sense out of what you're trying to accomplish here. Where does ddns even factor in?

Please write back and explain what you need to have happen.

Peace,
JimBass
 
Old 01-25-2007, 07:18 AM   #6
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,

I've had it all wrong!

Last time I posted I had holiday fever!

I've got a registered domain mycompany.net with a static ip.
The FreeBSD boxes get random ip's from my isp.
What I want to do is create subdomains for each FreeBSD box:
clientsite1.ddns.mycompany.net, clientsite2.ddns.mycompany.net,
clientsite3.ddns.mycompany.net....

Mainly I don't want to use dyndns.com, but want my own DDNS server.

I want to ssh to my FreeBSD box on clientsite1.ddns.mycompany.net and not the wan ip 41.242.3.66.

The FreeBSD boxes are used as vpn/firewall/routers.
There are several windows based pc's on site where other companies do support for the sales software and they use PcAnywhere.
Now every time these guys want to do support they first phone me for the ip of the FreeBSD box. I want them to use clientsite1.ddns.mycompany.net instead of the ip too.

What would the best route be for taking on this task?
Setting up a new DNS Server?
How?

Thanx in advance!
 
Old 01-25-2007, 09:48 AM   #7
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Ok, makes much more sense now!

Yes, you'll want to run your own ddns server, which is just a BIND dns server with a ton of keys for the remote hosts, allowing them to update just their specific subzone. As a partial example, clientsite1.ddns.mycompany.net would get one key, that allows it to update just the clientsite1.ddns.mycompany.net zone file. The main tools needed are the dnssec-keygen tool, which is a standard part of the BIND installation and also client install, and you'll need the nsupdate tool, so the clients can puch their changes to the nameserver. I googled (how to setup ddns server) and the most promising results were found here:

http://linux.yyz.us/nsupdate/
The server side setup is the next page, http://linux.yyz.us/dns/ddns-server.html.

You'll have to cron the updating I would think. and you'll also have to use the dnssec-keygen key to allow the clients to refresh the zone once they edit it. You'll have some permissions to mess with, and be certain BIND on the static box is running as user named or bind, not root, or you'll be exploit heaven.

Peace,
JimBass
 
Old 01-25-2007, 01:20 PM   #8
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
Thanx!

Now I know where to start.
I'll let U know how it goes.

Just a matter of interest:
I want to use SLES10 but my boss wants me to use FreeBSD V6.
What do U prefer?
I'll end up using the FreeBSD anyway but I'll try SLES on the side to.

Thanx again!
 
Old 01-25-2007, 03:12 PM   #9
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
I would never use Suse for any reason under the sun. I think all rpm based disros are crap, and are virtually windows-lite. Since Suse cut their deal with Microsoft, most people avoid them like the plague.

I agree with your boss 100% BSD is a very secure system, and ideal for doing things like this.

Peace,
JimBass
 
Old 01-26-2007, 04:06 AM   #10
nirmaltom
Member
 
Registered: Jun 2005
Location: India
Distribution: Redhat,Fedora,DSL,Ubuntu
Posts: 238

Rep: Reputation: 30
Quote:
Originally Posted by JimBass
I would never use Suse for any reason under the sun. I think all rpm based disros are crap, and are virtually windows-lite. Since Suse cut their deal with Microsoft, most people avoid them like the plague.
hi,
its true and i too accept it
regards,
Tom.
 
Old 02-02-2007, 12:31 AM   #11
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 Guys.

I'm almost done.
I've got other projects to take care of to,
but haven't given up yet.
I'll finish it over the weekend or so and when it is fully functional I'll post a Howto for all the newbies out there like me!

Thanx again for all the help.

Enjoy the rest of your day people!
 
Old 02-23-2007, 05:57 AM   #12
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
Not getting it right!!!

I need some help AGAIN.

The client freebsd box isn't updating its ip to the dns server.

Update file(updatedns.sh)
Code:
#!/bin/sh

NAME="client.ddns.mydomain.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/client.ddns.mydomain.co.za.+157+61514.key <<EOF

server mydnsserver
zone ddns.mydomain.co.za
update delete $NAME
update add $NAME 60 A $IP

EOF
Dns Server
Code:
$TTL 2D
@               IN SOA   ddns.mydomain.co.za. root.ddns.cos.co.za. (
                                2007022200      ; serial
                                3H              ; refresh
                                1H              ; retry
                                1W              ; expiry
                                1D )            ; minimum

zone "ddns.mydomain.co.za" {
        type master;
        file "/var/lib/named/dyn/ddns.mydomain.co.za";
        allow-update {
                key client.ddns.mydomain.co.za;
        };
};

key "client.ddns.mydomain.co.za" {
        algorithm "HMAC-MD5";
        secret "client.ddns.mydomain.co.za. IN KEY 512 3 157 WNmmnCCJ9VvzQosdrYOspQiOp02LxtPUlNAqAUbB/l2SBzsblfkl+1q7 t1+ZYS6rbEub0kJ5ejRwGxm6CGwvFA==";
};
Zone file
Code:
client.ddns.mydomain.co.za.   60      IN      A       10.10.245.232
When I do a manual update by running the update file I get the following output:

Code:
Creating key...
Sending update to mydnsserver#53
Outgoing update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:  29278
;; 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.253.168.173

;; TSIG PSEUDOSECTION:
client.ddns.mydomain.co.za.   0       ANY     TSIG    hmac-md5.sig-alg.reg.int. 1172231551 300 16 auy4U4zRmRIxlMyngdZ9Mw== 29278 NOERROR 0

; TSIG error with server: tsig indicates error

Reply from update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOTAUTH, id:  29278
;; 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. 1172231551 300 0  29278 BADKEY 0
Am I overlooking something?

Last edited by karelvdm; 02-23-2007 at 06:03 AM.
 
Old 02-23-2007, 08:53 AM   #13
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Since it seems to be complaining about the key, I'd start there. Are the keys identical? It would also be worth it to generate a new key and try that out if an md5sum on the keys does come out to be identical.

Also, another good reason to do that is you published here what the secret key is. This string, WNmmnCCJ9VvzQosdrYOspQiOp02LxtPUlNAqAUbB/l2SBzsblfkl+1q7 t1+ZYS6rbEub0kJ5ejRwGxm6CGwvFA==, should be kept hidden. With that string you can insert false data into your DNS record, should somebody want to.

Peace,
JimBass
 
Old 02-26-2007, 01:57 AM   #14
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
Thanx JimBass

I'll generate new keys.
Is my zone file correct?
 
Old 02-26-2007, 05:30 AM   #15
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
Is this the right command to generate the keys;

Code:
dnssec-keygen -a HMAC-MD5 -b 512 -n HOST client.ddns.mydomain.co.za.

Last edited by karelvdm; 02-26-2007 at 05:34 AM.
 
  


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 10:46 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