lots of fixes, new music stuff
[distro-setup] / disabled / home-vpn / README.sh
1 # this was in distro-end.
2 #
3 # Disabled because basically I don't need a home vpn and prefer just
4 # port forwarding as needed.
5
6 ### begin home vpn server setup
7
8
9 # # this section done initially to make persistent keys.
10 # # Also note, I temporarily set /etc/hosts so my host was
11 # # b8.nz when running this, since the vpn client config
12 # # generator assumes we need to go to that server to get
13 # # server keys.
14 # vpn-server-setup -rds
15 # s cp -r --parents /etc/openvpn/easy-rsa/keys /p/c/filesystem
16 # s chown -R 1000:1000 /p/c/filesystem/etc/openvpn/easy-rsa/keys
17 # # kw = kgpe work machine.
18 # for host in x2 x3 kw; do
19 # vpn-mk-client-cert -b $host -n home b8.nz 1196
20 # dir=/p/c/machine_specific/$host/filesystem/etc/openvpn/client
21 # mkdir -p $dir
22 # s bash -c "cp /etc/openvpn/client/home* $dir"
23 # # note: /etc/update-resolv-conf-home also exists for all systems with /p
24 # done
25
26 # key already exists, so this won't generate one, just the configs.
27 # m vpn-server-setup -rds
28 # sudo tee -a /etc/openvpn/server/server.conf <<'EOF'
29 # push "dhcp-option DNS 10.0.0.1"
30 # push "route 10.0.0.0 255.255.0.0"
31 # client-connect /a/bin/distro-setup/vpn-client-connect
32 # EOF
33 # sudo sed -i --follow-symlinks 's/10.8./10.9./g;s/^\s*port\s.*/port 1196/' /etc/openvpn/server/server.conf
34
35 # if [[ $HOSTNAME == tp ]]; then
36 # if [[ -e /lib/systemd/system/openvpn-server@.service ]]; then
37 # vpn_service=openvpn-server@server
38 # else
39 # vpn_service=openvpn@server
40 # fi
41 # sgo $vpn_service
42 # fi
43 ### end vpn server setup