Page 1 of 1

how to run website and Openvpn (@ UDP 53) at same time?

Posted: Sat Sep 17, 2011 9:33 am
by dhruvpandit
This problem is solved, but another is @ 3rd post.



here is my client config.

client
dev tun
proto udp #- protocol
remote xx.xx.xx.xx 1194 #- SERVER IP and OPENVPN Port
resolv-retry infinite
nobind
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
ca ca.crt
auth-user-pass
comp-lzo
verb 3








and here is server config.

local 123.123.123.123 #- your_server_ip
port 1194 #- port
proto udp #- protocol
dev tun
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login
client-cert-not-required
username-as-common-name
server 1.2.3.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 4.2.2.1"
keepalive 5 30
comp-lzo
persist-key
persist-tun
status 1194.log
verb 3



now, when i connect via my client openvpn, it asks for user/pass before connecting.

so pls tell me how to remove that authentication, so i can connect openvpn directly.

Re: how to connect my server without user/pass box directly?

Posted: Sat Sep 17, 2011 11:41 am
by Bebop
From client remove: "auth-user-pass"

from server remove:
"plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login"
"username-as-common-name"
"client-cert-not-required"

And you would want to give the client some certificates. Add to client conf:

"cert some.crt"
"key some.key"

(and be sure the physical files exist)

As for getting by with no certs and no pass at all, I don't know that.

Re: how to connect my server without user/pass box directly?

Posted: Sat Sep 17, 2011 1:10 pm
by dhruvpandit
thanks bro,

i also want to know that i want to connect openvpn on UDP 53 port.

but problem is that, i have dedicated server, and i am already running a site on it, so UDP 53 port is used by "named" . (i think its a DNS programme )

so can you guide me that how could i change the port of "named" service to other ( which should not effect site's running) and after that i can configure OpenVPN to UDP 53.

Re: how to run website and Openvpn (@ UDP 53) at same time?

Posted: Sat Sep 17, 2011 9:13 pm
by janjust
if the box requires DNS services (named) then you're out of luck; otherwise just stop named (service named off) and run openvpn on that port.