Objective: You setup a home Linux server behind your Linksys wireless router, the server is connect to the router using network cable directly, you'd like to provide web services to the Internet with the fixed domain name although your home boardband connection IP address is dynamic.
Concept: Use Dyndns.com dynamic DNS domain service (dyndns.org for example), and ddclient running on your home Linux server as daemon to update your router external IP address on dyndns.com periodically.
Steps:
- firstly, consider your dynamic domain name (e.g. jephe.dyndns.org). You must make sure the port 80 must be accessed from Internet to your home router. As I know, some boardband provider disabled the port 80 service coming to your router, for me, I use port 8888 because port 80 is not usable.
- register your name on www.dyndns.com, I used name 'jephe' and password xxxxxx
- add a host service as jephe.dyndns.org
- download ddclient from dyndns.com, untar it to your home Linux server and run 'mkdir /var/cache/ddclient, the log information will be saved to /var/log/messages.
- generate the ddclient configuration for your host which is jephe.dyndns.org from dyndns.com configuration generation service.
- put the configuration into /etc/ddclient/ddclient.conf (mkdir /etc/ddclient first)
- by default, the generated ddclient.conf is using checkip.dyndns.org web ip check service to update your router IP address for jephe.dyndns.org which is using http service, if your boardbard provider uses transparent web proxy, the ip will be wrong, you should change to your router status page update method.
- here is my configuraiton file /etc/ddclient/ddclient.conf
daemon=600 # check every 600 seconds
syslog=yes # log update msgs to syslog
mail-failure=jephe_wu@yahoo.com # Mail failed updates to user
pid=/var/run/ddclient.pid # record PID in file.
## Detect IP with our CheckIP server (comment out by jephe, use the router status page instead below)
#use=web, web=checkip.dyndns.com/, web-skip='IP Address'
####added by jephe
use=linksys, fw=192.168.100.1:80 # via Linksys's internet FW
fw-login=admin, fw-password=xxxxxx # FW login and password
## To obtain an IP address from FW status page (using fw-login, fw-password)
use=fw, fw=192.168.100.1/Status_Router.asp, fw-skip='IP Address:' # found after IP Address
#note: above IP Address: must have colon
#### end
## DynDNS username and password here
login=jephe
password=xxxxxx
## Default options
protocol=dyndns2
server=members.dyndns.org
## Dynamic DNS hosts
jephe.dyndns.org
- cp sample-etc_rc.d_init.d_ddclient.redhat to /etc/init.d/ddclient
- chkconfig ddclient on
- that's it , start up ddclient services 'service ddclient start', then tail -f /var/log/messages to check status and /var/cache/ddclient/ddclient.cache for information.
- done.
1. if your router real ip is the same as the one shown on page 'http://checkip.dyndns.ocm', then you can just use the default generated configuration from dyndns.com for ddclient.
2. or you can use inadyn which is another very simple dynamic dns update client, it only support http updating method.