Showing posts with label OpenVPN. Show all posts
Showing posts with label OpenVPN. Show all posts

Saturday, June 10, 2023

Renew openvpn certificate

 cd /etc/openvpn/easy-rsa
#replace server_X79s9v1gWRTvLcGp with your server_yourcertificate
# name server_X79s9v1gWRTvLcGp can be found in /etc/openvpn
./easyrsa renew server_X79s9v1gWRTvLcGp nopass
cp pki/issued/server_X79s9v1gWRTvLcGp.crt  ../
cp pki/private/server_X79s9v1gWRTvLcGp.key ../
/etc/init.d/openvpn restart

 

Monday, April 30, 2018

Setup OpenVPN

Server
1. Install openvpn
apt-get install openvpn

2. Install easy-rsa
apt-get install easy-rsa

3. Config easy-rsa

4. Config openvpn

Client
1. Install openvpn

2. Config openvpn

Thursday, January 12, 2017

Connect internet when using OpenVPN - Ubuntu 16.04

1. Setup OpenVPN using network manager

2. Open termainal, type
default_gateway=$(/sbin/ip route | awk '/default/ { print $3 }')
arr=(`echo ${default_gateway}`);
#echo "${arr[1]}"
sudo route add default gw "${arr[1]}"  wlp62s0
sudo route add -net 10.0.0.0 netmask 255.255.255.0 dev tun0

wlp620: main card connect internet (wifi or cable)
tun0: virtual interface of VPN connection
10.0.0.0 : base ip of VPN connection (ex: 10.0.0.3)


3. Save as changegateway
4. chmod +x changegateway
5. ./changegateway