Page 1 of 1

Openvpn basic configuration for full traffic routing

Posted: Mon Jul 04, 2011 10:18 pm
by maxim.veksler
My client machine is Ubuntu 11.04, my server machine is Ubuntu 10.10.
I'm trying to achieve the simplest quick and dirty solution possible to get all my client machine's traffic to be redirected to the server machine and from there to the internet.

For the I'm trying to follow this guide http://openvpn.net/index.php/open-sourc ... howto.html

Being new the openvpn, I've looked at the logs but I think that the client does not even attempt to contact the server to open the connection. Am I missing some configuration option or should I not be starting the client the same method I'm starting the server daemon?

On the server I have configured the following:

Code: Select all

    root@domU-12-31-39-16-42-4D:/etc/openvpn# cat /etc/openvpn/server.conf 
    dev tun
    ifconfig 10.8.0.1 10.8.0.2
    secret /etc/openvpn/static.key
    push "redirect-gateway def1 bypass-dhcp"
    
    proto udp
    comp-lzo
    
    status /var/log/openvpn-status.log
    log-append  /var/log/openvpn.log
    
    keepalive 10 120
    persist-key
    persist-tun
    ping-timer-rem
    
    verb 7
On the client machine I have configured the following:

Code: Select all

    root@maxim-desktop:/etc/openvpn# cat /etc/openvpn/client.conf 
    dev tun
    ifconfig 10.8.0.1 10.8.0.2
    secret /etc/openvpn/static.key
    
    proto udp
    comp-lzo
    
    persist-key
    persist-tun
    
    keepalive 10 120
    persist-key
    persist-tun
    ping-timer-rem
    
    status /var/log/openvpn-status.log
    log-append  /var/log/openvpn.log
    
    remote ec2-50-17-124-16.compute-1.amazonaws.com 1194
    resolv-retry infinite
    
    verb 7
I'm basically following this guide http://openvpn.net/index.php/open-sourc ... howto.html and still, when I open the vpn connection on the client side I don't get all my traffic to be redirected through the vpn server.


Thank you for helping,
Maxim.

Re: Openvpn basic configuration for full traffic routing

Posted: Tue Jul 05, 2011 7:47 am
by maikcat
hi there,


first change this to your client

>ifconfig 10.8.0.1 10.8.0.2
to this

ifconfig 10.8.0.2 10.8.0.1

i suggest take a step by step approach to achive your scenario,
because there are many difficulties (routing,Nat etc) to what you are trying to do..

Michael.