Step Seven Previous Contents

8. Step Seven

Explanation of Dynamic DNS from www.dyndns.org: The Dynamic DNS service allows you to alias a dynamic IP address to a static hostname, allowing your computer to be more easily accessed from various locations on the Internet. We provide this service for free to the Internet community as a whole. This section deals with making an account with www.dyndns.org, getting a client from them, installing that, then adding everything we've done on the previous chapters into the rc.local file, which is similar to the autoexec.bat file in windows environments.

8.1 Installing Dynamic DNS

My personal preference for Dynamic DNS is dyndns.org - but there are a lot of them out there. This step will take into account that you have gone with my recommendation. Go to their website and make an account (click on Members NIC) then 'New Account'. Once you confirm your account, you need to make a host first. Choose something easy that you will remember (the IP address, or any other field besides the host part isn't needed. Click on add). Once that is done, I personally recommend ddup (website) - go to the 'Download' section and grab the latest copy.

Go into the directory where the ddup tar file is.

cp ddup* /tmp/

tar -zxvf ddup*

cd ddup-3.0.1 (or whatever it installed it to)

sh install

Okay, run through the setup, and when it asks if you would like to make a configuration file, select yes. There was some confusion about this from some people, so I will clarify: your user name is what you signed up with dyndns.org, enter in your password, just let root use it, and then you're done! Let's make it global and test it out (make sure you're connected to the internet!), type:

cp /tmp/ddup-3.0.1/ddup /usr/bin

ddup --host (what_hostname_you_selected).dyndns.org

8.2 How to be online 24/7 with PPP

Okay, now to be 24/7 online:

Grab this file

You *WILL* need to edit this file to change it to your needs.

Next, type:

cp pppmonitor /usr/bin

8.3 How to make everything work when you reboot

A quick note: If you have entered anything below, and you notice that your boot script hangs and doesn't bring you to a login prompt, the steps you will need to follow to get to a login prompt and FIX whatever is making it hang are: 1. reboot your computer (ctrl+alt+del usually does a "graceful" shutdown, if not, the good o'le power switch will do it) 2. when the LILO: prompt comes up, type linux single 3. it will go into "single user mode" - this is one reason why you should never let your linux server (pysically) be allowed by anyone who you don't trust - it bypasses all passwords and gives you a root shell. 4. once the shell prompt comes up, type pico /etc/rc.d/rc.local 5. make the change necessary 6. type reboot and then just type linux at the LILO: prompt (or whatever you have setup to boot linux up *normally*.

Making all these programs run at boot-time.

pico /etc/rc.d/rc.local

add the following lines:


ifconfig eth0 up 192.168.0.1 netmask 255.255.255.0
route add -net 192.168.0.0 netmask 255.255.255.0 eth0


#Start the DHCP Server
dhcpd


#Start Dialing
ifup ppp0


#Update Dyndns.org with our new IP address
ddup --host (what_hostname_you_selected).dyndns.org


#Start our firewall
pmfirewall start


#Start our online-checker
/usr/bin/pppmonitor &


#add this line if your ISP kicks you off from inactivity.
#ping -i 360 yahoo.com &


#Start the proxy caching server
squid


#Start portsentry in stealth mode
portsentry -stcp
portsentry -sudp

Save this file, make sure you *can* get online right now, reboot the computer, and watch in amazement :)

Enjoy,

Fandelem


Previous Contents