Openvpn basic configuration for full traffic routing

Need help configuring your VPN? Just post here and you'll get that help.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
maxim.veksler
OpenVpn Newbie
Posts: 1
Joined: Mon Jul 04, 2011 10:15 pm

Openvpn basic configuration for full traffic routing

Post by maxim.veksler » Mon Jul 04, 2011 10:18 pm

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.

User avatar
maikcat
Forum Team
Posts: 4202
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: Openvpn basic configuration for full traffic routing

Post by maikcat » Tue Jul 05, 2011 7:47 am

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.
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

Post Reply