About installing ddclient

Discussion in 'Server Operation' started by satimis, Nov 25, 2006.

  1. satimis

    satimis Member

    Hi folks,

    Ubuntu-6.06.1-LAMP-server-amd64

    On installing ddclient, what shall I fill in on;
    Interface used for dynamic DNS service:

    TIA


    B.R.
    satimis
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Can you be more detailed about the context of your question, maybe also provide a screenshot?
     
  3. satimis

    satimis Member

    Hi falko,

    I found it. "eth0"

    Now I have ddclient installed.

    $ sudo /usr/sbin/ddclient -daemon 300 -syslog
    No printout.

    Where can I find the start/stop/restart scripts.

    Besides how to test ddclient to check whether it works. TIA


    B.R.
    satimis
     
  4. falko

    falko Super Moderator Howtoforge Staff

    They are in /etc/init.d.

    Check the log files. Also, you can stop your internet connection and connect again and check if the IP address of your domain has been updated.
     
  5. satimis

    satimis Member

    Hi falko,

    Tks for your advice.

    $ dpkg -l | grep ddclient
    Code:
    ii  ddclient                                         3.6.2-6ubuntu1              Update dynamic IP address at DynDNS.org
    
    ddclient is running.

    IP address was updated on DYNDNS.ORG server whenever this server reconnected. I have it confirmed on login DYNDNS.ORG website.

    But failed to ping my domain.

    $ sudo ping -c 3 satimis.homelinux.com
    Code:
    PING satimis.homelinux.com (58.152.161.53) 56(84) bytes of data.
    
    --- satimis.homelinux.com ping statistics ---
    3 packets transmitted, 0 received, 100% packet loss, time 2001ms
    
    iptables has been stopped.

    Please advise how fix this problem.


    B.R.
    satimis
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Might be your router's firewall that doesn't allow pings.
     
  7. satimis

    satimis Member

    Hi falko,

    I don't have router nor hardware firewall.

    The server is directly connected to an ADSL modem with a CAT5 cable. The another end of the ADSL modem is connected to a telephone wall socket with a telephone cable. The ADSL modem is supplied by ISP and does not need any setup.

    B.R.
    satimis
     
  8. falko

    falko Super Moderator Howtoforge Staff

    So you use your server for surfing the web? Or how do you use your internet connection with multiple systems?
     
  9. satimis

    satimis Member

    Hi falko,

    No. Once this server has been full configured and running properly. I'll connect a workstation to this server. Internet surfing will be done on workstation.

    Sorry, I don't follow. Whether you meant how to make broadband connection to the workstation. I'll add another NIC on the server to do masqerading.


    B.R.
    satimis
     
  10. falko

    falko Super Moderator Howtoforge Staff

    So your server will be the router.

    What's the output of
    Code:
    iptables -L
    ?
     
  11. satimis

    satimis Member

    Hi falko,

    $ sudo iptables -L
    Code:
    Password:
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    TCPMSS     tcp  --  anywhere             anywhere            tcp flags:SYN,RST/S YN tcpmss match 1400:1536 TCPMSS clamp to PMTU
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    $ sudo iptables -L -n -v
    Code:
    Chain INPUT (policy ACCEPT 10142 packets, 9083K bytes)
     pkts bytes target     prot opt in     out     source               destination
    
    Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
     pkts bytes target     prot opt in     out     source               destination
        0     0 TCPMSS     tcp  --  *      ppp0    0.0.0.0/0            0.0.0.0/0           tcp flags:0x06/0x02 tcpmss match 1400:1536 TCPMSS clamp to PMTU
    
    Chain OUTPUT (policy ACCEPT 9482 packets, 1410K bytes)
     pkts bytes target     prot opt in     out     source               destination
    
    B.R.
    satimis
     
  12. falko

    falko Super Moderator Howtoforge Staff

    Please switch off the firewall and try to ping again.
     
  13. satimis

    satimis Member

    Hi falko,

    I did it before without breakthrough.

    Now I tried again;
    # sudo /etc/init.d/firewall stop
    Code:
    Removing all iptables rules:  [End of flush]
    
    # ping -c 3 satimis.homelinux.com
    Code:
    PING satimis.homelinux.com (58.152.181.13) 56(84) bytes of data.
    (it hung here.  Waiting for input???)
    
    On presing [Ctrl]+c it prompted;
    Code:
    --- satimis.homelinux.com ping statistics ---
    3 packets transmitted, 0 received, 100% packet loss, time 1999ms
    
    # ping -c 3 219.78.151.64
    Code:
    PING 219.78.151.64 (219.78.151.64) 56(84) bytes of data.
    64 bytes from 219.78.151.64: icmp_seq=1 ttl=64 time=0.064 ms
    64 bytes from 219.78.151.64: icmp_seq=2 ttl=64 time=0.051 ms
    64 bytes from 219.78.151.64: icmp_seq=3 ttl=64 time=0.049 ms
    
    --- 219.78.151.64 ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2001ms
    rtt min/avg/max/mdev = 0.049/0.054/0.064/0.010 ms
    
    "219.78.151.64" is IP address on connection. My server is not always up, only switched on during testing. On next connection another IP address will be asigned. It won't change until turning off the server.

    Tks


    B.R.
    satimis
     
  14. falko

    falko Super Moderator Howtoforge Staff

    You're pinging the wrong IP address because satimis.homelinux.com points to the wrong IP address. It is possible that 58.152.181.13 is unused at the moment, therefore your pings don't work.
    You should make ddclient update the IP address (currently 219.78.151.64).
     
  15. satimis

    satimis Member

    Hi falko,

    Further to my late posting.

    I requested a friend to make following tests on his WinXP box

    C:\>ping -n 3 satimis.homelinux.com
    Code:
    Pinging satimis.homelinux.com [58.152.181.13] with 32 bytes of data:
    
    Request timed out.
    Request timed out.
    Request timed out.
    
    C:\>telnet satimis.homelinux.com 25
    Code:
    Connecting To satimis.homelinux.com...Could not open connection to the host, on
    port 25.
    A connection attempt failed because the connected party did not properly respond
     after a period of time, or established connection failed because connected host
     has failed to respond.
    
    C:\>ping -n 3 219.79.144.87
    Code:
    Pinging 219.79.144.87 with 32 bytes of data:
    
    Reply from 219.79.144.87: bytes=32 time=140ms TTL=59
    Reply from 219.79.144.87: bytes=32 time=124ms TTL=59
    Reply from 219.79.144.87: bytes=32 time=120ms TTL=59
    
    Ping statistics for 219.79.144.87:
        Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 120ms, Maximum = 140ms, Average = 128ms
    
    On browser ran "219.79.144.87" unable to browse homepage on my server.

    "219.79.144.87" is the IP of my server on connection.

    Tks


    B.R.
    satimis
     
    Last edited: Dec 4, 2006
  16. satimis

    satimis Member

    Hi falko,

    I discovered the trick.

    $ sudo ping -c 3 www.satimis.homelinux.com
    Code:
    PING satimis.homelinux.com (58.152.183.105) 56(84) bytes of data.
    64 bytes from n058152183105.netvigator.com (58.152.183.105): icmp_seq=1 ttl=27 time=35.9 ms
    64 bytes from n058152183105.netvigator.com (58.152.183.105): icmp_seq=2 ttl=27 time=36.3 ms
    64 bytes from n058152183105.netvigator.com (58.152.183.105): icmp_seq=3 ttl=27 time=35.0 ms
    
    --- satimis.homelinux.com ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2401ms
    rtt min/avg/max/mdev = 35.045/35.761/36.313/0.573 ms
    
    Then it worked. It needs www as prefix.

    Please advise what other tests I have to continue. TIA


    B.R.
    satimis
     
  17. satimis

    satimis Member

    Hi falko,

    "satimis.homelinux.com" may have problem.

    On browser running "satimis.homelinux.com"/"www.satimis.homelinux.com" can't display the homepage.


    I have registered another free domain "satimis.freeddns.com"

    $ sudo ping -c 3 satimis.freeddns.com
    Code:
    Password:
    PING satimis.freeddns.com (220.246.238.244) 56(84) bytes of data.
    64 bytes from n220246238244.netvigator.com (220.246.238.244): icmp_seq=1 ttl=64 time=0.033 ms
    64 bytes from n220246238244.netvigator.com (220.246.238.244): icmp_seq=2 ttl=64 time=0.033 ms
    64 bytes from n220246238244.netvigator.com (220.246.238.244): icmp_seq=3 ttl=64 time=0.034 ms
    
    --- satimis.freeddns.com ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2015ms
    rtt min/avg/max/mdev = 0.033/0.033/0.034/0.004 ms
    
    On browser running "satimis.freeddns.com" displayed the homepage.

    B.R.
    satimis
     
  18. falko

    falko Super Moderator Howtoforge Staff

    Please read my previous posting again. satimis.freeddns.com is working because it is pointing to the correct IP address (your server 220.246.238.244), but satimis.homelinux.com is pointing to the wrong IP address (58.152.183.105).
     
  19. satimis

    satimis Member

    Hi falko,

    "58.152.183.105" is the IP address asigned by dyndns.com/org at time of registration. Each time ping "satimis.homelinux.com" it automatically pointed to this IP. It is completely out of my control. Logon their site my running IP address found updated, same as on "ifconfig".

    I sent dyndns.com a mail informing them this matter without a reply. I'm now working on "satimis.freeddns.com". My friend on his WinXP can browse the homepage on my server with;
    "satimis.freeddns.com:8080"

    port 80 seems blocked by ISP.

    On WinXP box :-
    C:\>telnet satimis.freeddns.com
    Code:
    Connecting To satimis.freeddns.com...Could not open connection to the
    host, on port 23.
    No connection could be made because the target machine actively refused
    it.
    
    C:\>telnet satimis.freeddns.com 25
    Code:
    Connecting To satimis.freeddns.com...Could not open connection to the
    host, on port 25.
    A connection attempt failed because the connected party did not
    properly respond after a period of time, or established connection
    failed because connected host has failed to respond.
    
    But still I can't send mails.

    # cat /etc/postfix/main.cf
    Code:
    #myorigin = /etc/mailname
    
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no
    append_dot_mydomain = no
    
    #delay_warning_time = 4h
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database =
    btree:${queue_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package
    for
    # information on enabling SSL in the smtp client.
    
    #myhostname = server1.example.com
    myhostname = mail.satimis.freeddns.com
    mydomain = satimis.freeddns.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    #myorigin = /etc/mailname
    #mydestination = /etc/postfix/local-host-names
    myorigin = $myhostname
    mydestination = $myhostname, localhost.$mydomain, localhost
    #relayhost = satimis.homelinux.com
    mynetworks = 127.0.0.0/8, 192.168.0.0/24
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    inet_protocols = all
    smtpd_sasl_local_domain = 
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions =
    permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    mailbox_command = 
    home_mailbox = Maildir/
    virtual_maps = hash:/etc/postfix/virtusertable
    
    # telnet localhost 25
    Code:
    Trying 127.0.0.1...
    Connected to localhost.satimis.freeddns.com.
    Escape character is '^]'.
    .....
    This is a test
    .
    250 Ok: queued as AAA0A75406D
    quit
    221 Bye
    
    Failed.

    # cat /var/log/mail.log
    Code:
    Dec  6 08:41:12 #ubuntu
    mail postfix/smtpd[5977]: connect from
    localhost.satimis.freeddns.com[127.0.0.1]
    Dec  6 08:42:37 #ubuntu
    mail postfix/smtpd[5977]: AAA0A75406D:
    client=localhost.satimis.freeddns.com[127.0.0.1]
    Dec  6 08:43:03 #ubuntu
    mail postfix/cleanup[5980]: AAA0A75406D:
    message-id=<[email protected]>
    Dec  6 08:43:03 #ubuntu
    mail postfix/qmgr[5562]: AAA0A75406D:
    from=<[email protected]>, size=428, nrcpt=1 (queue active)
    Dec  6 08:43:03 #ubuntu
    mail postfix/qmgr[5562]: AAA0A75406D: to=<[email protected]>,
    relay=none, delay=45, status=deferred (delivery temporarily suspended:
    connect to e.mx.mail.yahoo.com[216.39.53.1]: Connection timed out)
    Dec  6 08:44:18 #ubuntu
    mail postfix/smtpd[5977]: disconnect from
    localhost.satimis.freeddns.com[127.0.0.1]
    Dec  6 08:45:21 #ubuntu
    mail postfix/cleanup[6007]: 9245F754072:
    message-id=<[email protected]>
    Dec  6 08:45:21 #ubuntu
    mail postfix/qmgr[5562]: 9245F754072:
    from=<[email protected]>, size=536, nrcpt=1 (queue
    active)
    Dec  6 08:45:21 #ubuntu
    mail postfix/local[6008]: fatal: gethostbyname: Success
    Dec  6 08:45:22 #ubuntu
    mail postfix/qmgr[5562]: warning: premature end-of-input on
    private/local socket while reading input attribute name
    Dec  6 08:45:22 #ubuntu
    mail postfix/qmgr[5562]: warning: private/local socket: malformed
    response
    Dec  6 08:45:22 #ubuntu
    mail postfix/qmgr[5562]: warning: transport local failure -- see a
    previous warning/fatal/panic logfile record for the problem description
    Dec  6 08:45:22 #ubuntu
    mail postfix/master[5064]: warning: process /usr/lib/postfix/local pid
    6008 exit status 1
    Dec  6 08:45:22 #ubuntu
    mail postfix/master[5064]: warning: /usr/lib/postfix/local: bad command
    startup -- throttling
    Dec  6 08:45:22 #ubuntu
    mail postfix/qmgr[5562]: 9245F754072:
    to=<[email protected]>, orig_to=, relay=none,
    delay=1, status=deferred (delivery temporarily suspended: unknown mail
    transport error)
    Dec  6 08:48:13 #ubuntu
    mail postfix/cleanup[6020]: 9951F754075:
    message-id=<[email protected]>
    Dec  6 08:48:13 #ubuntu
    mail postfix/qmgr[5562]: 9951F754075:
    from=<[email protected]>, size=536, nrcpt=1 (queue
    active)
    Dec  6 08:48:13 #ubuntu
    mail postfix/local[6021]: fatal: gethostbyname: Success
    Dec  6 08:48:14 #ubuntu
    mail postfix/qmgr[5562]: warning: premature end-of-input on
    private/local socket while reading input attribute name
    Dec  6 08:48:14 #ubuntu
    mail postfix/qmgr[5562]: warning: private/local socket: malformed
    response
    Dec  6 08:48:14 #ubuntu
    mail postfix/qmgr[5562]: warning: transport local failure -- see a
    previous warning/fatal/panic logfile record for the problem description
    Dec  6 08:48:14 #ubuntu
    mail postfix/master[5064]: warning: process /usr/lib/postfix/local pid
    6021 exit status 1
    Dec  6 08:48:14 #ubuntu
    mail postfix/master[5064]: warning: /usr/lib/postfix/local: bad command
    startup -- throttling
    Dec  6 08:48:14 #ubuntu
    mail postfix/qmgr[5562]: 9951F754075:
    to=<[email protected]>, orig_to=, relay=none,
    delay=1, status=deferred (delivery temporarily suspended: unknown mail
    transport error)
    
    # iptables -L
    Code:
    Chain INPUT (policy ACCEPT)
    target  prot opt source   destination
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source   destination
    TCPMSS     tcp  --  anywhere  anywhere    tcp flags:SYN,RST/SYN tcpmss
    match
    1400:1536 TCPMSS clamp to PMTU
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source   destination
    
    Tks.


    B.R.
    satimis
     
  20. falko

    falko Super Moderator Howtoforge Staff

    must go in one line in your main.cf. Please change it and restart Postfix. What are the outputs of
    Code:
    netstat -tap
    and
    Code:
    postfix check
    then?
     

Share This Page