How to create server.conf file

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
gambler
OpenVpn Newbie
Posts: 1
Joined: Tue Nov 09, 2010 12:25 am

How to create server.conf file

Post by gambler » Tue Nov 09, 2010 12:33 am

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

User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

Re: How to create server.conf file

Post by krzee » Tue Nov 16, 2010 9:43 am

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

Post Reply