Server Config from Client

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
fluxbox
OpenVpn Newbie
Posts: 2
Joined: Tue Sep 06, 2011 7:30 am

Server Config from Client

Post by fluxbox » Tue Sep 06, 2011 7:32 am

Hi,
I am an existing subscriber from an openvpn provider and I would like to host my own openvpn server. The client config file that works for me is :
------------------
client
dev tun
proto tcp
remote <remote ip> 443
keepalive 10 120
resolv-retry infinite
redirect-gateway def1 bypass-dhcp
tun-mtu 1500
tun-mtu-extra 32
comp-lzo
mute 3
mute-replay-warnings
float
nobind
ping-timer-rem
mssfix 1450
persist-key
persist-tun
ca ca.crt
route-method exe
reneg-sec 0
auth-user-pass useridpassword.ovpn
verb 2
http-proxy 10.102.61.46 8080
log /sdcard/openvpn/log.ovpn
---------------
I would like to seek your help on how to configure the server-side config for the above client config.

Thank you very much.

User avatar
Bebop
Forum Team
Posts: 301
Joined: Wed Dec 15, 2010 9:24 pm

Re: Server Config from Client

Post by Bebop » Sat Sep 10, 2011 12:51 am

This is not an exact match for your client.conf, but it is a good start if you want to build your own server. Not all of the options of your client.conf are really necessary, so you best start with the essentials and add more as per requirements later. There are some really good tutorials on the web. Tell me what flavor of Linux you plan to use and I can point you to a good tute.

Code: Select all

port 1194
proto udp
dev tun
server 10.8.0.0 255.255.255.0
topology subnet

push "redirect-gateway def1 bypass-dhcp"

ca ./ca.crt
cert ./server.crt
key ./server.key 
dh ./dh1024.pem

script-security 2

status ./openvpn-status.log
log         ./openvpn.log
verb 0

keepalive 10 120
comp-lzo
The cure for boredom is curiosity

fluxbox
OpenVpn Newbie
Posts: 2
Joined: Tue Sep 06, 2011 7:30 am

Re: Server Config from Client

Post by fluxbox » Sat Sep 10, 2011 5:36 am

I'm using a VPS with CentOS/OpenVPN installed.

User avatar
Bebop
Forum Team
Posts: 301
Joined: Wed Dec 15, 2010 9:24 pm

Re: Server Config from Client

Post by Bebop » Sat Sep 10, 2011 5:56 am

OpenVPN already installed. Excellent. Post server.conf if it exists.

If it doesn't exist already, use this:

server.conf

Code: Select all

port 443
proto tcp
dev tun
server 10.8.0.0 255.255.255.0
topology subnet

push "redirect-gateway def1"

script-security 2

status ./openvpn-status.log
log         ./openvpn.log
verb 3

keepalive 10 120
comp-lzo

float

tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
Here's some parts of your client sample that I didn't account for yet:

mute-replay-warnings
ping-timer-rem
reneg-sec 0
auth-user-pass useridpassword.ovpn
http-proxy 10.102.61.46 8080

I basically don't know those options because I never used them. Another forum member may be able to help. I can look up the manual when I get a chance. Also, if you take the initiative to figure those options I can help if you come across error. Basically though, the above code is as precisely matched to your sample as I can get it for the moment.
The cure for boredom is curiosity

Post Reply