# vppn: Virtual Pretty Private Network ## Roadmap * Peer: router: create process for managing the routing table * Peer: router: track mediators, enable / disable ... * Hub: track peer last-seen timestamp * Peer: local peer discovery - part of RoutingProcessor ## Principles * Creates an IPv4/24 network with a maximum of 254 peers. (1-254) * Simple setup: via setup link from the hub. * Each peer has full network state replicated from the hub. ## Design * Append nonce to end of packet * Then it's readable whether signed or unsiged * Types of packets to send: * standard: encrypt and send * Forward via: encrypt, sign and send * Forward to: send * Type of packeting read from interface: * Forward to: check signature * Forwarded, standard Incoming from net: * Data for iface * Packet for forward * Packet for routingHandler * Incoming from iface: * Data for peer ## Hub Server Configuration ``` # Create user. adduser user # Enable ssh. cp -r ~/.ssh /home/user/ chown -R user:user /home/user/.ssh ``` Upload `hub` executable: ``` scp hub user@:~/ ``` Create systemd file in `/etc/systemd/system/hub.service ``` Description=hub Requires=network.target [Service] AmbientCapabilities=CAP_NET_BIND_SERVICE Type=simple User=user WorkingDirectory=/home/user/ ExecStart=/home/user/hub -listen :https -secure=true -root-dir=/home/user Restart=always RestartSec=8 TimeoutStopSec=24 [Install] WantedBy=default.target ``` Add and start the hub server: ``` systemctl daemon-reload systemctl start hub ``` Get initial password from logs: ``` journalctl -f -u hub -n 100 ``` Sign-in and configure.