1
I installed OpenVPN on my Ubuntu machines (both client and server are Ubuntu machines). Its a fresh Ubuntu installation (13.10). I wrote some config files, for client and server:
server.conf: (my servers IP is 192.168.0.3)
local 192.168.0.3
port 1194
proto tcp
dev tun
ca /etc/openvpn/easy-rsa/easyrsa3/pki/ca.crt
cert /etc/openvpn/easy-rsa/easyrsa3/pki/issued/server.crt
key /etc/openvpn/easy-rsa/easyrsa3/pki/private/serverreq.key
dh /etc/openvpn/easy-rsa/easyrsa3/pki/dh.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 192.168.0.0 255.255.254.0"
client-to-client
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
client.conf:
client
dev tun
proto tcp
remote 192.168.0.3 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/client.crt
key /etc/openvpn/keys/clientreq.key
comp-lzo
As you see from the screenshoots, connection is established:
client side: http://postimg.org/image/s1g5stkpj/
I guess it all seem to work. So if I have such VPN connection, how can I send/receive data through it? Do I need a special command or what? Please give step by step instruction :)
- My VPN server IP address is 10.8.0.1
- My VPN client IP address is 10.8.0.6
What traffic do you want to go through the VPN? Connections to 192.168.0.0/23, like specified? Or everything? – Daniel B – 2014-03-02T11:38:36.957
@DanielB: I was thinking about sending files through my vpn, for example with scp. Is that possible? How can I know that Im sendind it through the VPN connection, not my "default" connection? – mirx – 2014-03-02T11:44:08.437
You can tell from the local socket, using
netstat -np
for example. I'm not sure it would work for you though, because you're trying to tunnel your local network. – Daniel B – 2014-03-02T12:03:03.977@DanielB: ok but when I use VPN IP addresses (from
10.x.x.x
sebnet) instead of local addresses (from192.x.x.x
subnet) to send files, it will send them through the VPN tunnel, right? – mirx – 2014-03-02T12:23:17.677That's correct. – Daniel B – 2014-03-02T12:46:19.830