Page 1 of 1

How to create server.conf file

Posted: Tue Nov 09, 2010 12:33 am
by gambler
Hi All,

I've successfully setup a openvpn tunnel with the CLI and now I want to set it to run in the daemon but i'm not sure how to set up the server.conf file.

These are the lines I use to establish the link:

Server 1:

Code: Select all

openvpn --remote [server 2 ip] --dev tun1 --ifconfig 192.168.150.2 192.168.150.1 --secret key
Server 2:

Code: Select all

openvpn --remote [server 1 ip] --dev tun1 --ifconfig 192.168.150.1 192.168.150.2 --secret key
Once the tunnel is up I then add the appropriate routes.

Any help with how to create the server.conf would be greatly appreciated.

Cheers

Re: How to create server.conf file

Posted: Tue Nov 16, 2010 9:43 am
by krzee
gambler wrote:Hi All,

I've successfully setup a openvpn tunnel with the CLI and now I want to set it to run in the daemon but i'm not sure how to set up the server.conf file.
OpenVPN allows any option to be placed either on the command line or in a configuration file. Though all command line options are preceded by a double-leading-dash ("--"), this prefix must be removed when an option is placed in a configuration file.
openvpn --remote [server 2 ip] --dev tun1 --ifconfig 192.168.150.2 192.168.150.1 --secret key
This is the same as starting openvpn with this config:

Code: Select all

remote [server 2 ip] 
dev tun1 
ifconfig 192.168.150.2 192.168.150.1 
secret key
Once the tunnel is up I then add the appropriate routes.
openvpn would be happy to do that for you