Wednesday, March 23, 2016

Sample Configuration File

Bittorrent sync is awesome. End of story. 

I am syncing different directories between my work computer, home computer, raspberry pi, and cell phone. Mostly the pi is the "source" of my files, and external backup in case one of my drives dies. 

One problem I ran into was that for some reason, if I ran btsync at startup of the pi it would "forget" all the directories I had shared. I don't know why. I decided instead to run with a config file containing all the directories I was syncing since that wouldn't change from shutdown to startup and such. However, I couldn't find any good examples online! So once I got mine working I posted it to my github.

I left the fields secret and dir, under shared folders blank. To generate a read-write secret, run ./btsync --generate-secret within the folder that the btsync executable is in. In the dir field, enter the directory you'd like to sync. Keep in mind that btsync cannot merge non-empty directories.

Go check it out for a decent example or starting point to bittorrent sync config files.

Thursday, March 10, 2016

Linux Networking Commands

netstat - shows you the state of all active sockets
ping - sends packets to another ip address
ifconfig - shows your computers networking information
traceroute - displays the route that a packet takes
hostname - set or display the current host/domain name
nslookup - query name servers directly
netcat - set up a connection between two computers, almost looks like a messaging application.

Wednesday, March 9, 2016

Networking

Networking, like onions, comes in layers. Unlike onions, networks have about 5 layers

layer 1: Physical. The lowest layer, the physical connection. This could be something like wifi, ethernet, radio connection. Learn physics.

layer 2: Link. Next to lowest, this layer contains information about the physical layer, and allows you to send bytes over it.

layer 3: Network. This layer assigns addresses to different communicating things on the network. Most people are familiar with IPv4 and IPv6, but there are less popular alternatives.

layer 4: Transport. This is what the T in TCP stands for. TCP basically guarantees that all your bytes have been transferred, and that they look like a single stream.

layer 5: Application. This is a two byte internal identifier that your computer uses to know which application made which request. (PORT number).