# DynDNS behind a router?

## -=GGW=- $ol!d $n4>|e

Hey, I used to host my own blog off of my gentoo install, once without a router, and once behind a linksys that had a dyndns tool built in. I know have a shoddy router now that i moved out of the house (funds are limited). Is there a way to tell a dyndns client on my computer to take my actual ip and not my lan ip?

thanks,

Michael

----------

## steveb

net-dns/ddclient can do that.

// SteveB

----------

## oxffffff

If you use ez-ipupdate for the task of telling dynDNS your IP address, you can compile it with this patch http://ouaye.net/files/web-ip-detection.patch applied to the source first.

----------

## steveb

 *oxffffff wrote:*   

> If you use ez-ipupdate for the task of telling dynDNS your IP address, you can compile it with this patch http://ouaye.net/files/web-ip-detection.patch applied to the source first.

 ddclient offers that functionality without patching  :Smile: 

----------

## pteppic

inadyn works without patching too.

----------

## -=GGW=- $ol!d $n4>|e

thanks, i set it up using ddclient, didn't know it had something built-in to acomadate, i think before i was trying to use ip-update and didn't notice the documentation.

My problem now, which i think might be a more severe one, is that i dont thing my router D-Link Dl-604 has port forwarding. Thus, althought i have assigned my computer a static ip within the router, i don't think there is a way to route port 80 to me. :\

----------

## steveb

 *-=GGW=- $ol!d $n4>|e wrote:*   

> My problem now, which i think might be a more severe one, is that i dont thing my router D-Link Dl-604 has port forwarding.

 Maybe I am wrong, but have a look here

// SteveB

----------

## -=GGW=- $ol!d $n4>|e

thanks, i got everything working after poking around for a while.

----------

## steveb

Cool  :Very Happy: 

----------

## soroh6

I just made a cron script for ez-ipupdate instead of using the init.d script.  For whatever reason, ez-ipupdate does not allow you to use an "address=" line when in daemon mode.

/etc/cron.hourly/address_updater

```
#!/bin/sh

# will fetch your current external ip address

export CURRENT_IP=`lynx -source www.whatismyip.org`

/bin/cat /etc/ez-ipupdate/YOURCONFIG.conf | perl -ne 'if ($_ =~ /address/) { $_ = "address=$ENV{CURRENT_IP}\n"; print $_; } else { print $_; };' > /etc/ez-ipupdate/YOURCONFIG.conf

/usr/sbin/ez-ipupdate -c /etc/ez-ipupdate/YOURCONFIG.conf
```

(don't forget to chmod +x address_updater)

This will modify the address= line of your ez-ipupdate conf file to your current external IP address, and then run ez-ipupdate to submit it.  There is no error checking, it's just a quick hack to make it work for me.

Just make sure you have an address= line in your .conf file and it will get updated.

----------

