snow: How To Install

How To Install

Note: Code is currently undergoing a compatibility-breaking rewrite. Installing the published version right now is not recommended, and to discourage this the network bootstrap node is not running.

First install build dependencies:

# apt-get install git g++ make libssl-dev

Optional:

# apt-get install libminiupnpc-dev libnatpmp-dev

Now get the code and compile it:

$ git clone git://github.com/zrm/snow  
$ cd snow/src  
$ make -j5

If you don't want UPnP or NAT-PMP or get an error related to libminiupnpc (e.g. Ubuntu 14.04 ships an incompatible version), you can compile without them:

$ make -j5 NO_UPNP=1 NO_NATPMP=1

Install (as root):

# make install

Now add a firewall rule to drop packets from the snow address pool (by default 172.16.0.0/12) from all other interfaces. If you are already using this address range for something then choose a different one (see Advanced Configuration). You do not have to use the same address pool as other devices running snow. The first address in the pool will by default be the virtual address of your own device.

# iptables -I INPUT -s 172.16.0.0/12 ! -i snow0 -j DROP  
# iptables -I INPUT -s 172.16.0.1 -i lo -j ACCEPT  
# apt-get install iptables-persistent  
# iptables-save > /etc/iptables/rules.v4

The "snowd" and "sdnsd" binaries you installed should now work if started as root, but first a reminder about what "automatic NAT traversal" means. It's a bit like having an IPv6 address. Packets from The Internet will come to Your Computer. If you want to turn off any services or set any appropriate firewall rules, now is the time. This is your final warning.

At this point you can try to start the daemons (use "-d" to run in background):

# snowd -d  
# sdnsd -d

You should get some messages in the system log:

# tail -n20 /var/log/syslog

Now set your DNS server to 127.0.0.1 you should be able to do this:

$ ping local.key  
PING local.key (172.16.0.1) 56(84) bytes of data.  
64 bytes from baaaac6rxjmmenb7m5txgpe3nmmrrh4z4ohcr7sxqkrvbk4csbrrorpw7.key (172.16.0.1): icmp_seq=1 ttl=64 time=0.036 ms  
64 bytes from baaaac6rxjmmenb7m5txgpe3nmmrrh4z4ohcr7sxqkrvbk4csbrrorpw7.key (172.16.0.1): icmp_seq=2 ttl=64 time=0.069 ms  
^C

You should (theoretically) now be able to reach your device using its key from some other device running snow. If it works then you can schedule "/usr/sbin/snowd -d" and "/usr/sbin/sdnsd -d" to run at boot in the usual way.

If you got this far and it worked (or it didn't), let me know.

[snow] [How it works] [How to use it] [How to install it] [Advanced Configuration] [App Development] [Read the FAQ]