Previous |
Home | Next |
Detailed technical
aspects of individual modems will not be
covered here,
please consult your user manual for information on key modem settings.
If the modem came preconfigured from your ISP, please contact them for
any technical assistance. |
[bash]# vi
/etc/sysconfig/network-scripts/ifcfg-eth0 |
# External Ethernet
Device (BRIDGED MODE - NO PROTOCOL) DEVICE=eth0 TYPE=Ethernet ONBOOT=yes USERCTL=no BOOTPROTO=none <-- No protocol defined here. PEERDNS=no HWADDR=00:00:21:E0:B8:B9 IPV6INIT=no |
When the ethernet "eth0" device is brought to the active state it will not be allocated (or broadcast for) an IP address and therefore not appear in the routing table as it is in "bridged" mode. |
[bash]# vi
/etc/sysconfig/network-scripts/ifcfg-ppp0 |
TYPE=xDSL DEVICE=ppp0 PROVIDER=ppp0 USER='[email protected]' ONBOOT=yes DEMAND=no USERCTL=no PERSIST=yes PEERDNS=no DEFROUTE=yes ETH=eth0 BOOTPROTO=dialup FIREWALL=NONE PING=. PPPOE_TIMEOUT=80 LCP_INTERVAL=20 LCP_FAILURE=3 CONNECT_TIMEOUT=60 CONNECT_POLL=6 CLAMPMSS=1412 SYNCHRONOUS=no PIDFILE=/var/run/pppoe-adsl.pid IPV6INIT=no |
Parameter |
Details |
DEVICE |
The logical name for the
PPP device |
PROVIDER |
A friendly name for the
ISP |
USER |
The ISP account username
(password is specified in separate
file) |
ONBOOT |
Specifies whether the devices should start when the system starts (depending on network service) |
USERCTL |
Directs that only root, or all system users can control the device |
PERSIST |
Will attempt to redial
the connection if the link is
disconnected |
PEERDNS |
Import the DNS nameserver settings into /etc/resolv.conf (careful if running own DNS) |
DEFROUTE |
Sets the device as the
default gateway |
ETH |
Tells PPPoE client which
network device to use |
BOOTPROTO |
The protocol type used to initialise the device (static | dhcp | none) |
[bash]# vi /etc/ppp/pap-secrets |
"[email protected]"
"ppp0" "YOUR_ISP_PASSWORD" |
[bash]# chmod 600 /etc/ppp/pap-secrets |
[bash]# vi /etc/ppp/pppoe-server-options |
require-pap login lcp-echo-interval 10 lcp-echo-failure 2 |
[bash]# /etc/init.d/network
restart |
[bash]# tail /var/log/messages |
galaxy network: Bringing
up interface eth1: succeeded galaxy pppd[10190]: pppd 2.4.2 started by root, uid 0 galaxy pppd[10190]: Using interface ppp0 galaxy pppd[10190]: Connect: ppp0 <--> /dev/pts/4 galaxy pppoe[10191]: PPP session is 5036 galaxy pppd[10190]: CHAP authentication succeeded galaxy pppd[10190]: local IP address xxx.xxx.xxx.xxx <-- Your DHCP Address galaxy pppd[10190]: remote IP address 202.154.95.169 galaxy network: Bringing up interface ppp0: succeeded |
[bash]# ifconfig ppp0 |
ppp0
Link
encap:Point-to-Point
Protocol inet addr:xxx.xxx.xxx.xxx P-t-P:202.154.95.169 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1 RX packets:2753 errors:0 dropped:0 overruns:0 frame:0 TX packets:2636 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:1470035 (1.4 Mb) TX bytes:472461 (461.3 Kb) |
[bash]# ifup
ppp0 [bash]# ifdown ppp0 |
[bash]# route -n |
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 202.154.95.169 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 <-- Remote Interface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 0.0.0.0 202.154.95.169 0.0.0.0 UG 0 0 0 ppp0 <-- Default Gateway |
The eth0
device
does not get listed in the routing table, it is only providing a virtual connection
for the ppp0
link to
cross. |
DDNS
is only used with globally routed IP addresses which are external of
your private network. This is not the internal private network
addresses. Basic
DNS principles for private networks are covered in chapter
8. |
Organisation |
Website |
ZoneEdit |
http://www.zoneedit.com |
No-IP.com |
http://www.no-ip.com |
DynDNS.org |
http://www.dyndns.org |
DHS
International |
http://www.dhs.org |
DyNS |
http://www.dyns.cx |
Cn99 |
http://www.3322.org |
DynDNS.DK |
http://dyndns.dk |
eNom,
Inc |
http://www.enom.com |
TZODNS |
http://www.tzo.com |
You will need to
register your host (ie. galaxy.example.com)
against your present dynamic IP address. You should also now add an
"alias" (or CNAME) of "www" which points to galaxy.example.com -
substitute for your specific domain. Be sure to set an MX (mail
exchange) record for your domain if you plan on setting up a mail server for your network. |
[bash]# vi /etc/ppp/ip-up.local |
wget -O -
--http-user=username --http-passwd=password
--no-check-certificate \ "https://dynamic.zoneedit.com/auth/dynamic.html?host=galaxy.example.com" |
Always check the wget
command in a terminal window first, this allows you to debug it slightly
and view (or install) any SSL certificates that are associated with
the website. |
[bash]# wget -O -
--http-user=username --http-passwd=password --no-check-certificate \ "https://dynamic.zoneedit.com/auth/dynamic.html?host=galaxy.example.com" |
--21:28:12--
https://dynamic.zoneedit.com/auth/dynamic.html?host=galaxy.example.com => `-' Resolving dynamic.zoneedit.com... 69.72.142.98 Connecting to dynamic.zoneedit.com[69.72.142.98]:443... connected. WARNING: Certificate verification error for dynamic.zoneedit.com: self signed certificate WARNING: certificate common name `localhost.localdomain' doesn't match requested host name `dynamic.zoneedit.com'. HTTP request sent, awaiting response... 200 OK Length: 109 [text/html] 0% [ ] 0 --.--K/s <SUCCESS CODE="200" TEXT="Update succeeded." ZONE="example.com" HOST="galaxy.example.com" IP="xxx.xxx.xxx.xxx"> 100%[====================================================================>] 109 --.--K/s 21:28:17 (1.93 MB/s) - `-' saved [109/109] |
[bash]# vi /bin/ddns-update |
#!/bin/sh # # DDNS Automation Script - ZoneEdit.com # File: /bin/ddns-update # Set ZoneEdit.com Account Details USER=username PASS=password HOST=galaxy.example.com [email protected] # Constants - change files if needed TMP1=/tmp/ddns_tmp1 TMP2=/tmp/ddns_tmp2 # Send update request and save results wget -O $TMP1 --http-user=$USER --http-passwd=$PASS --no-check-certificate \ "https://dynamic.zoneedit.com/auth/dynamic.html?host=$HOST" echo ZoneEdit.com - DDNS Update > $TMP2 echo Time: `date '+%T - %e %B'` >> $TMP2 cat $TMP1 >> $TMP2 cat $TMP2 | mail -s "ZoneEdit.com - DDNS Update for $HOST" $EMAIL rm -f $TMP1 $TMP2 |
[bash]# chmod +x /bin/ddns-update |
[bash]# crontab -e |
00 */8 * * *
/bin/ddns-update |
ERROR CODE="707" TEXT="Duplicate updates for the same host/ip, adjust client settings" ZONE="example.com" HOST="galaxy.example.com"> |
Previous |
Home | Next |