# - bof - #



# :1
# -  - #
# - Create user - #
sudo adduser is_derayo;
sudo usermod -aG sudo is_derayo;
sudo usermod -c "Djalmar Enrique Rayo" is_derayo;

# :1.a
# -  - #
# - set bashrc file & install software - #
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y;
sudo apt install git screenfetch tree vim -y;
# sudo apt install openvpn;



# :2
# -  - #
# - Configure ssh - #
sudo vim /etc/ssh/sshd_config;

PermitRootLogin yes
PasswordAuthentication yes

sudo systemctl restart sshd;



# :3
# -  - #
# - ssh into OpenVPN-CT server - #
ssh-keygen -R 192.168.1.103;
ssh 192.168.1.103;

cd ~/.ssh;
ssh-keygen -t rsa;

sudo mkdir /Data;
sudo chown -R is_derayo:is_derayo /Data;

Run DataFoldersConfiguration.ssh



# :4
# -  - #
# - Update lxc - #

sudo shutdown now;



# :5
# -  - #
# - Edit lxc config - #
cd /etc/pve/lxc;
sudo vim 800.conf;

lxc.cgroup.devices.allow: c 10:200 rvm
lxc.cgroup2.devices.allow: c 10:200 rvm
lxc.mount.entry: /dev/net dev/net none bind,create=dir
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file 



# :6
# -  - #
# - Change chown tun file - #
sudo chown 100000:100000 /dev/net/tun;

la /dev/net/tun;



# :7
# -  - #
# - Install software - #
cd ~/Downloads;
git clone https://github.com/Nyr/openvpn-install;

cd openvpn-install/
chmod +x openvpn-install.sh;
sudo ./openvpn-install.sh;

sudo cp /root/OpenVPN-Arch1.ovpn .;
sudo chown is_derayo:is_derayo OpenVPN-Arch1.ovpn;



# :9
# -  - #
# - Configure server.conf file - #
sudo vim /etc/openvpn/server/server.conf;
verb 0

sudo systemctl restart openvpn-server@server.service;




# :10
# -  - #
# - Openvpn status - #
systemctl status openvpn;


╭── # is_derayo@OpenVPN-CT ~/Documents/openvpn-install :
╰─▷ $ systemctl status openvpn;
WARNING: terminal is not fully functional
Press RETURN to continue 
* openvpn.service - OpenVPN service
     Loaded: loaded (/usr/lib/systemd/system/openvpn.service; enabled; preset: enabled)
     Active: active (exited) since Sun 2025-02-02 05:38:49 UTC; 9h ago
       Docs: man:openvpn(8)
    Process: 258 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
   Main PID: 258 (code=exited, status=0/SUCCESS)
        CPU: 1ms


# :11
# -  - #
# - Ubuntu OpenVPN Configuration - #
sudo apt install network-manager-openvpn network-manager-openvpn-gnome \
                 network-manager-pptp network-manager-vpnc -y;
sudo apt install sshfs fuse -y





# :15
# -  - #
# - Copy software to is_derayo user - #
rsync -avvhP --mkpath --delete --exclude=.* \
            /root/openvpn-install \
            /home/is_derayo/Documents/;











# - eof - #
