Skip to content

Instantly share code, notes, and snippets.

@iifast2
Last active January 13, 2023 08:15
Show Gist options
  • Save iifast2/fb1e801de42586008a39f15baadbcb37 to your computer and use it in GitHub Desktop.
Save iifast2/fb1e801de42586008a39f15baadbcb37 to your computer and use it in GitHub Desktop.
OpenVPN connect Setup on Proxmox.md
#### In proxmox shell / CMD ####
cd /etc/pve/lxc
# press "ls" to list your containers and you can find the container number.
nano (container number)
add these lines
lxc.cgroup.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net dev/net none bind,create=dir
# add these 2 lines of code above in your CT config file , then press CTRL+ X , Y and hit ENTER.
# you can check if it's saved :
cat (container number)
# run this command
chown 100000:100000 /dev/net/tun
check that it worked
ls -l /dev/net/tun
output should be something like this
crw-rw-rw- 1 100000 100000 10, 200 Dec 22 13:26 /dev/net/tun
# start up your container then :
#### In Container shell / CMD ####
apt upgrade && apt update -y
apt install openvpn git
git clone https://github.com/Nyr/openvpn-install
cd openvpn-install
bash openvpn-install.sh
cd
ls
cat (.ovpn file)
copy - paste in notepad
save as .ovpn file :)
# Ressources :
# https://wiki.amahi.org/index.php/Find_Your_Gateway_IP
# https://www.cyberciti.biz/faq/how-to-find-my-public-ip-address-from-command-line-on-a-linux/#:~:text=Use%20dig%20command%20for%20determining%20my%20public%20IP%20address%20Linux%3A&text=Type%20the%20following%20dig%20(domain,com%20%40resolver1.opendns.com
# https://test-ipv6.com/broken.html#:~:text=Run%20ifconfig%20%2Da%20and%20look,or%20%3A%3A%20or%20%3A%3A%2F0%20.
# ip -6 address show
# https://www.whatismyip.com/
# https://www.yougetsignal.com/tools/open-ports/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment