Ubuntu Linux 14.0.6 openvpn site to site static key

in #linux7 years ago

This is the simple way on how to create openvpn site to site using static key

Server config

first you need to install openvpn by typing

sudo apt-get install openvpn

now you need to create static key by typing

sudo openvpn --genkey --secret /etc/openvpn/static.key

now you need to go to the folder /etc/openvpn by typing

cd /etc/openvpn/

now you need to create config file for server by typing

nano server.conf

a simple config should look like this


dev tun0
ifconfig 10.10.3.1 10.10.3.2
secret static.key
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
log-append /var/log/openvpn.log
port 1194

Client Config

first you need to install openvpn by typing

sudo apt-get install openvpn

now you need to transfer the static key from server to client machine by typing

sudo scp /etc/openvpn/static.key login@clientip:/etc/openvpn

now you need to go to the folder on client machine /etc/openvpn by typing

cd /etc/openvpn/

now you need to create config file for client by typing

nano client.conf

a simple config should look like this


remote server ip
dev tun0
ifconfig 10.10.3.2 10.10.3.1
secret static.key
keepalive 10 60
log-append /var/log/openvpn.log
port 1194

if you guys have any question leave the comments below

Sort:  

Hi. I am a volunteer bot for @resteembot that upvoted you.
Your post was chosen at random, as part of the advertisment campaign for @resteembot.
@resteembot is meant to help minnows get noticed by re-steeming their posts


To use the bot, one must follow it for at least 3 hours, and then make a transaction where the memo is the url of the post.
If you want to learn more - read the introduction post of @resteembot.
If you want help spread the word - read the advertisment program post.


Steem ON!

Congratulations @lavdim! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You published your First Post
You got a First Vote

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Coin Marketplace

STEEM 0.28
TRX 0.12
JST 0.033
BTC 62233.47
ETH 2998.30
USDT 1.00
SBD 3.50