Page 1 of 1

Server Config from Client

Posted: Tue Sep 06, 2011 7:32 am
by fluxbox
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.

Re: Server Config from Client

Posted: Sat Sep 10, 2011 12:51 am
by Bebop
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

Re: Server Config from Client

Posted: Sat Sep 10, 2011 5:36 am
by fluxbox
I'm using a VPS with CentOS/OpenVPN installed.

Re: Server Config from Client

Posted: Sat Sep 10, 2011 5:56 am
by Bebop
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.