V
5  
Tags
There are no tags for this page.
Attachments
Dobrica Pavlinušić's random unstructured stuff
IP over DNS

I guess that you already know everything about this. However, here is a list of changes specific to me:

  • I wanted everything to be automatic: just /etc/init.d/nstxcd start and I should be ready to go
  • I use dnsmasq for local DNS proxy (with cacheing) so my configuration use /etc/resolv.conf-upstream

Server setup

More or less standard, expect for fact that my DNS server has multiple IP addresses and I do want to run bind on some of them. So I added something like:

# /etc/bind/named.conf
options {
    listen-on {
        1.2.3.4;
    }
}

Configuring nstx is straightforward:

# /etc/default/nstx
NSTX_DOMAIN="tunnel.example.com"
start_nstxd=yes
ifup_tun=tun0
NSTX_IFACE="1.2.3.4"

Rest of the setup is same as in original instructions.

Client setup

Here comes the fun part.

# /etc/network/interfaces
iface tun0 inet static
        address 10.0.0.2
        netmask 255.0.0.0
        mtu 500 # optional, may solve ssh problems
        post-up route add -host `grep nameserver /etc/resolv.conf-upstream |head -1|awk '{print $2}'` gw `netstat -rn | grep ^0.0.0.0 | awk '{ print $2 }'` ; route del default ; route add -net default gw 10.0.0.1
        post-down dhclient

post-up part is modified so that DNS server doesn't have to be in same network segment as my IP address (as it often isn't).

# /etc/default/nstx
NSTX_DOMAIN="tunnel.example.com"
NSTX_DNS_SERVER=`grep nameserver /etc/resolv.conf-upstream |head -1|awk '{print $2}'`
start_nstxcd=yes
ifup_tun=tun0

Since I don't want to start nstxcd on each startup (because I don't need it always) I did:

sudo update-rc.d -f nstx remove
sudo update-rc.d -f nstxc remove

With this, I can get IP address and just do /etc/init.d/nstxcd start and I'm ready to go...


 

Upload Files

Click "Browse" to find the file you want to upload. When you click "Upload file" your file will be uploaded and added to the list of attachments for this page.

Maximum file size: 50MB

 
 
 
File Name Author Date Uploaded Size

Save Page As

Enter a meaningful and distinctive title for your page.

Page Title:

Tip: You'll be able to find this page later by using the title you choose.

Page Already Exists

There is already a page named XXX. Would you like to:

Save with a different name:

Save the page with the name "XXX"

Append your text to the bottom of the existing page named: "XXX"

Upload Files

Click "Browse" to find the file you want to upload. When you click "Add file" this file will be added to the list of attachments for this page, and uploaded when you save the page.

 
 
 
Add Tags

Enter a tag and click "Add tag". The tag will be saved when you save the page.

Tag: 

Suggestions: