Expat-IT Tech Bits

Home

Contact

Links

Search this site:

Categories:

/ (287)
  Admin/ (122)
    Apache/ (10)
      HTTPS-SSL/ (4)
      PHP/ (3)
      performance/ (2)
    Cherokee/ (1)
    LAN/ (4)
    LVM/ (6)
    Monitoring/ (2)
      munin/ (2)
    SSH/ (6)
    SSL/ (1)
    Samba/ (1)
    VPN-options/ (6)
      OpenVPN/ (1)
      SSH-Proxy/ (3)
      Tinc/ (1)
      sshuttle/ (1)
    backups/ (17)
      SpiderOak/ (1)
      backuppc/ (5)
      dirvish/ (1)
      misc/ (6)
      rdiff-backup/ (1)
      rsync/ (1)
      unison/ (2)
    commandLine/ (24)
      files/ (8)
      misc/ (10)
      network/ (6)
    crontab/ (1)
    databases/ (15)
      MSSQL/ (2)
      MySQL/ (8)
      Oracle/ (3)
      PostgreSQL/ (1)
    dynamicDNS/ (2)
    email/ (11)
      Dovecot/ (1)
      deliverability/ (1)
      misc/ (1)
      postfix/ (7)
      puppet/ (1)
    iptables/ (3)
    tripwire/ (1)
    virtualization/ (9)
      VMware/ (1)
      virtualBox/ (8)
  Coding/ (14)
    bash/ (1)
    gdb/ (1)
    git/ (3)
    php/ (5)
    python/ (4)
      Django/ (2)
  Education/ (1)
  Hosting/ (27)
    Amazon/ (18)
      EBS/ (3)
      EC2/ (10)
      S3/ (1)
      commandline/ (4)
    Godaddy/ (2)
    NearlyFreeSpeech/ (3)
    Rackspace/ (1)
    vpslink/ (3)
  Linux/ (30)
    Android/ (1)
    Awesome/ (3)
    CPUfreq/ (1)
    China/ (2)
    Debian/ (8)
      APT/ (3)
      WPA/ (1)
    audio/ (1)
    encryption/ (3)
    fonts/ (1)
    misc/ (6)
    remoteDesktop/ (1)
    router-bridge/ (3)
  SW/ (45)
    Micro$soft/ (1)
    browser/ (2)
      Chrome/ (1)
      Firefox/ (1)
    business/ (28)
      Drupal/ (9)
      KnowledgeTree/ (6)
      Redmine/ (2)
      SugarCRM/ (7)
      WebERP/ (2)
      WordPress/ (1)
      eGroupware/ (1)
    chat/ (1)
    email/ (1)
    fileSharing/ (2)
      btsync/ (1)
      mldonkey/ (1)
    graphics/ (2)
    research/ (2)
    website/ (6)
      blog/ (6)
        blosxom/ (3)
        rss2email/ (1)
        webgen/ (1)
  Security/ (15)
    IMchat/ (2)
    circumvention/ (2)
    cryptoCurrency/ (1)
    e-mail/ (4)
    greatFirewall/ (1)
    hacking/ (1)
    password/ (1)
    privacy/ (2)
    skype/ (1)
  Services/ (1)
    fileSharing/ (1)
  TechWriting/ (1)
  xHW/ (14)
    Lenovo/ (1)
    Motorola_A1200/ (2)
    Thinkpad_600e/ (1)
    Thinkpad_a21m/ (3)
    Thinkpad_i1300/ (1)
    Thinkpad_x24/ (1)
    USB_audio/ (1)
    scanner/ (1)
    wirelessCards/ (2)
  xLife/ (17)
    China/ (9)
      Beijing/ (5)
        OpenSource/ (3)
    Expatriation/ (1)
    Vietnam/ (7)

Archives:

  • 2016/07
  • 2016/05
  • 2016/02
  • 2016/01
  • 2015/12
  • 2015/11
  • 2015/06
  • 2015/01
  • 2014/12
  • 2014/11
  • 2014/10
  • 2014/09
  • 2014/07
  • 2014/04
  • 2014/02
  • 2014/01
  • 2013/12
  • 2013/10
  • 2013/08
  • 2013/07
  • 2013/06
  • 2013/05
  • 2013/04
  • 2013/02
  • 2013/01
  • 2012/12
  • 2012/10
  • 2012/09
  • 2012/08
  • 2012/07
  • 2012/06
  • 2012/05
  • 2012/04
  • 2012/03
  • 2012/01
  • 2011/12
  • 2011/11
  • 2011/10
  • 2011/09
  • 2011/08
  • 2011/07
  • 2011/06
  • 2011/05
  • 2011/04
  • 2011/02
  • 2010/12
  • 2010/11
  • 2010/10
  • 2010/09
  • 2010/08
  • 2010/07
  • 2010/06
  • 2010/05
  • 2010/04
  • 2010/03
  • 2010/02
  • 2010/01
  • 2009/12
  • 2009/11
  • 2009/10
  • 2009/09
  • 2009/08
  • 2009/07
  • 2009/06
  • 2009/05
  • 2009/04
  • 2009/03
  • 2009/02
  • 2009/01
  • 2008/12
  • 2008/11
  • 2008/10
  • 2008/09
  • Subscribe XML RSS Feed

    Creative Commons License
    This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
    PyBlosxom

    This site has no ads. To help with hosting, crypto donations are accepted:
    Bitcoin: 1JErV8ga9UY7wE8Bbf1KYsA5bkdh8n1Bxc
    Zcash: zcLYqtXYFEWHFtEfM6wg5eCV8frxWtZYkT8WyxvevzNC6SBgmqPS3tkg6nBarmzRzWYAurgs4ThkpkD5QgiSwxqoB7xrCxs

    Wed, 22 Oct 2008


    /Admin/dynamicDNS: Dynamic DNS Behind a Router in China

    My current situation (if I wish to continue saving a few bucks by sharing a broadband line) forces me to operate a server through my landlord's router. All I did on the router was set the DMZ[1] of the router to the IP of my server, so that any network traffic that is not specifically routed elsewhere by the router gets sent to my server.

    Having found no way of extracting the public IP from the router, I am left with one option: dynamic DNS services that permit (do not penalize) regular polling. The highest profile service of this type is dyndns.com[2], however I have found that their service does not respond to clients in China. In fact, the only viable option I have found so far is 88ip.cn, which as you can see is a 100% Chinese site. So far it works very well for me though.

    First click on 注册 and register an account on the site. Once logged in (the 登录 button) click on the 管理 button to access the "domains" area. There you get to select a sub-domain of 88ip.net, ie. "anything.88ip.net", then click on 确定. After that, selected domains should appear in the 地名 list. And that is about all you have to know about the website.

    Setting up the client side on your server is a little more complicated, and definitely not well documented, at least for Linux users. They have a number of clients on offer for download[4]. They offer three different Linux downloads, none of them a Debian .deb, and one of them even wanted to install a binary!! (A big no-no, especially in China.....) I will document what I believe to be the best client setup below, so you do not have to mess with their messy installers. First create the following /etc/ddns/xml/upddns.xml file (depending on your browser, you may have to "view source" to see the following file):

    <?xml version="1.0"?> <ELinkPacket> <MsgType>ActiveTestReq</MsgType> <Version>1.0</Version> <UserName>your88ipUsername</UserName> <UserPwd>your88ipPassword</UserPwd> </ELinkPacket>

    Username and password above should be the same as used to login to their website. Now create a small script /etc/ddns/sh/upddns.sh to ping 88ip.cn's server:

    /usr/bin/curl -v -d "`cat /etc/ddns/xml/upddns.xml`" \
    http://link.dipserver.com/elink/elink.dll/

    Note the reference above to /etc/ddns/xml/upddns.xml. Note that if you run this script from the command line, there is output, but there is no output if it is run in cron. I do not really understand this difference at the moment. And finally, create a cron job ("crontab -e") to run the script every five minutes:

    0-59/5 * * * * /etc/ddns/sh/upddns.sh

    88ip.cn's scripts actually were set to make this cron run every two minutes, but I think that is a bit excessive for my purposes. There is no output from this cron, so you will only see an e-mail if there is an error.

    Now if you point your browser to your "anything.88ip.cn" URL, it should be directed to a web server running on your server. Since 88ip.cn's interface does not specify a URL, we can assume that all URLs in a given 88ip.cn account will be pointed to the same IP address.

    [1] http://en.wikipedia.org/wiki/Demilitarized_zone_(computing)
    [2] http://www.dyndns.com/
    [3] http://www.88ip.cn/
    [4] http://www.88ip.cn/Download/

    posted at: 04:17 | path: /Admin/dynamicDNS | permanent link to this entry

    Tue, 21 Oct 2008


    /Admin/dynamicDNS: Dynamic DNS Basics

    You already have a broadband internet account at home, you have some unused hardware laying around, you know how to setup and configure a server, so why not save a few bucks and run your server at home?:

    So if you are not intending on using an e-mail server on your server at home, and whatever service(s) you were planning on providing (website?) can absorb a little downtime from power and ISP outages, it is a go. Especially if you want to run some very particular software that is not commonly available from cheap hosting services, leaving you with the relatively more expensive option of renting your own server.

    Dynamic DNS is really very simple. Computers understand numeric IP[4] ("Internet Protocol") addresses of the form 111.222.333.444. Humans understand alphanumeric internet addresses of the form www.myname.com. When you type www.myname.com into your web browser (or any other network application) www.myname.com must be pointing at the correct 111.222.333.444 for it to work. That is all DNS ("Domain Name Service") really is. "Dynamic DNS" just refers to the situation where the numeric IP address changes frequently, and the slightly specialized methods used to keep www.myname.com and 111.222.333.444 in sync when this is the case.

    In your home, you will be faced with two general options:

    Why would you want the added complication of the second option? Because somewhere on your network you must run a piece of software that will update www.myname.com with the new 111.222.333.444 whenever the latter changes. That piece of information is a property of the network interface that is directly connected to the internet, located on your router. If you are using a commercial off-the-shelf router, that information can be hard or impossible to extract from it. Some routers are pre-configured to talk to certain Dynamic DNS providers, and maybe some of them actually work in this role. I have so far not been so lucky as to find one that does. If the router is your own machine, whose hardware and software you have complete control of, everything tends to be a bit easier.

    That said, if you are sharing an internet connection, you might not have a choice in the router department.....

    Just to be clear, while probably achieving the opposite, the usual way to tell your Dynamic DNS service that you have a new numeric IP address is to send it a very simple message using http, and that message AUTOMATICALLY must contain your current public IP address (your new numeric address). The Dynamic DNS service then just strips this new IP out of the message. The complication is, most Dynamic DNS services do not want you to waste their resources by sending them this http message every two minutes. Most will freeze your account if you do. They want to hear from you only when the address really has changed, which is why the Dynamic DNS software client running on your network must know when your IP address changes, so that it then will know it is time to tickle the Dynamic DNS service provider.

    [1] http://en.wikipedia.org/wiki/Dynamic_ip
    [2] http://en.wikipedia.org/wiki/Dynamic_DNS
    [3] http://blog.langex.net/index.cgi/Admin/LAN/build-your-own-router.html
    [4] http://en.wikipedia.org/wiki/Ip_address

    posted at: 07:30 | path: /Admin/dynamicDNS | permanent link to this entry