PIROVANO



1 Alix Slackware
1.5 DynDNS


If you get a dynamic IP from your ISP and want having access to your alix or PC from all over the internet using a Full-qualified-domain-name (e.g. youralix.dyndns.org) then this could be a way accomplising it.

Get an Account at www.dyndns.org and define there your desiredname.dyndns.org.

Get my pre-built ddclient-package for Slackware 12.1 from here.
Get my pre-built ddclient-package for Slackware 12.2 from here.

OR

Build the installable package yourself:
For Slackware 12.1: Get ddclient package-buid-script here, mirror and the source here, mirror.
For Slackware 12.2: Get ddclient package-buid-script here, mirror and the source here, mirror.

tar xzvf ddclient.tar.gz
cp ddclient-3.x.x.tar.bz2 ddclient
cd ddclient
./ddclient.SlackBuild


Your installable package you'll find in /tmp. Copy/Move it to any save location for future usage.

installpkg ddclient-3.x.x-i486-2_SBo.tgz

Get and installpkg the Perl-Package (~13MB) from your Slackware-CD, put to alix using ftp, or wget it somewhere from the internet.

vi /etc/ddclient/ddclient.conf
daemon=1200 # check every 1200 seconds
#syslog=yes # log update msgs to syslog
#mail=root # mail all msgs to root
#mail-failure=root # mail failed update msgs to root
pid=/var/run/ddclient.pid # record PID in file.
#ssl=yes # use ssl-support. Works with
use=if, if=ppp0
login=YOURLOGIN # default login
password=YOURPWD # default password
protocol=dyndns2
server=members.dyndns.org
DESIREDNAME.dyndns.org

With this, the public IP on ppp0 will be checked and updated to your desiredname.dyndns.org.
More explanation for this .conf-file you may want to get from http://www.dyndns.com/support/kb/using_ddclient_with_dyndns_services.html

Run ddclient with ddclient.
If you want it started automatically:
chmod -x /etc/rc.d/rc.ddclient
Put ddclient into /etc/rc.d/rc.local

Check your assined IP to ppp0: ifconfig ppp0
Check if dyndns has this very assined IP: dig a DESIREDNAME.dyndns.org

Allow the Service(s) of your choice beeing accessible from the internet by editing and running /etc/rc.d/rc.firewall:
For Service running on alix:
iptables -F
...
...
iptables -A INPNUT -i ppp0 -p tcp --dport XX -j ACCEPT
#Replace XX with the port-number the service is listening to.
...
...
iptables -A INPUT -i ppp0 -j DROP


For Service running on internal Machine (i.e. Port-Forward):
iptables -t nat -F
iptables -t nat -A POSTROUTING ...
...
...
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 3389 -j DNAT --to 192.168.10.200:3389
#This example will allowing incoming Remotedesktop RDP-Connection to your Wlan-Client having IP 192.168.10.200.

Note: The internal client must be able doing internet-connection, i.e. having proper routing/standard gateway to alix defined, otherwise it won't answer.

Giving static IP to an internal client using DHCP
vi /etc/dhcpd.conf
host HOSTNAME {
hardware ethernet 00:00:00:00:00:00; #Enter the MAC of your internel PC.
fixed-address 192.168.10.10; #Example Wlan-Client receiving always 192.168.10.10.
:write :quit

killall dhcpd
dhcpd


Copyright 2009 pirovano.ch. Last modified 2009-08-02 0850 CEST.
E-Mail: pirovano(at)[this-very-domain]