Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just set up a VPN connection to my workplace, but it fail s to connect. Our protocol for setting up VPN on Windows clients requires we specify DNS servers that are inside our corporate network. I cannot find the way to do this on Ubuntu f.or the VPN connection I have set up.

share|improve this question

1 Answer 1

I have not tried this but it may help you. From the Ubuntu Server Guide

sudo cp /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz /etc/openvpn/  
sudo gzip -d /etc/openvpn/server.conf.gz

Edit /etc/openvpn/server.conf changing the following options to:

local 172.18.100.101
dev tap0
up "/etc/openvpn/up.sh br0"
down "/etc/openvpn/down.sh br0"
;server 10.8.0.0 255.255.255.0
server-bridge 172.18.100.101 255.255.255.0 172.18.100.105 172.18.100.200
push "route 172.18.100.1 255.255.255.0"
push "dhcp-option DNS 172.18.100.20"
push "dhcp-option DOMAIN example.com"
tls-auth ta.key 0 # This file is secret

Then

cd /etc/openvpn/easy-rsa/
source vars
./pkitool hostname

Replace hostname with the actual hostname of the machine connecting to the VPN. Copy the following files to the client:

/etc/openvpn/ca.crt
/etc/openvpn/easy-rsa/keys/hostname.crt
/etc/openvpn/easy-rsa/keys/hostname.key
/etc/openvpn/ta.key
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.