OpenVPN on Debian doesn't want to route?

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
jonathanb
OpenVpn Newbie
Posts: 8
Joined: Wed Mar 09, 2011 8:38 am

OpenVPN on Debian doesn't want to route?

Post by jonathanb » Wed Mar 09, 2011 8:51 am

Hello everyone,

I have a single server with Debian Lenny on it named dragonwall (it does sound stupid doesn't it?). The server has Shorewall, Bind9 (slave) and samba installed. I recently installed OpenVPN on it with the hope that people can connect to both the servers (5.x) and the clients (10.x). I can make a connection with the OpenVPN GUI but when i have the connection i can't browse to the servers where the shares are on and the clients can't be reached by ping. :(
I think it's because it doesn't route the traffic. When I'm physically in the network everything does work, only when I'm connected with VPN I can't do anything except pinging the 192.168.6.2

Hopefully the following information will help troubleshooting my problem. (This is my testingLAB network)

Image

Code: Select all

OpenVPN's server.conf file:


    #################################################
    # Sample OpenVPN 2.0 config file for            #
    # multi-client server.                          #
    #                                               #
    # This file is for the server side              #
    # of a many-clients <-> one-server              #
    # OpenVPN configuration.                        #
    #                                               #
    # OpenVPN also supports                         #
    # single-machine <-> single-machine             #
    # configurations (See the Examples page         #
    # on the web site for more info).               #
    #                                               #
    # This config should work on Windows            #
    # or Linux/BSD systems.  Remember on            #
    # Windows to quote pathnames and use            #
    # double backslashes, e.g.:                     #
    # "C:\\Program Files\\OpenVPN\\config\\foo.key" #
    #                                               #
    # Comments are preceded with '#' or ';'         #
    #################################################

    # Which local IP address should OpenVPN
    # listen on? (optional)
    local 192.168.1.2

    # Which TCP/UDP port should OpenVPN listen on?
    # If you want to run multiple OpenVPN instances
    # on the same machine, use a different port
    # number for each one.  You will need to
    # open up this port on your firewall.
    port 1194

    # TCP or UDP server?
    ;proto tcp
    proto udp

    # "dev tun" will create a routed IP tunnel,
    # "dev tap" will create an ethernet tunnel.
    # Use "dev tap0" if you are ethernet bridging
    # and have precreated a tap0 virtual interface
    # and bridged it with your ethernet interface.
    # If you want to control access policies
    # over the VPN, you must create firewall
    # rules for the the TUN/TAP interface.
    # On non-Windows systems, you can give
    # an explicit unit number, such as tun0.
    # On Windows, use "dev-node" for this.
    # On most systems, the VPN will not function
    # unless you partially or fully disable
    # the firewall for the TUN/TAP interface.
    ;dev tap
    dev tun

    # Windows needs the TAP-Win32 adapter name
    # from the Network Connections panel if you
    # have more than one.  On XP SP2 or higher,
    # you may need to selectively disable the
    # Windows firewall for the TAP adapter.
    # Non-Windows systems usually don't need this.
    ;dev-node MyTap

    # SSL/TLS root certificate (ca), certificate
    # (cert), and private key (key).  Each client
    # and the server must have their own cert and
    # key file.  The server and all clients will
    # use the same ca file.
    #
    # See the "easy-rsa" directory for a series
    # of scripts for generating RSA certificates
    # and private keys.  Remember to use
    # a unique Common Name for the server
    # and each of the client certificates.
    #
    # Any X509 key management system can be used.
    # OpenVPN can also use a PKCS #12 formatted key file
    # (see "pkcs12" directive in man page).
    ca ca.crt
    cert server.crt
    key server.key  # This file should be kept secret

    # Diffie hellman parameters.
    # Generate your own with:
    #   openssl dhparam -out dh1024.pem 1024
    # Substitute 2048 for 1024 if you are using
    # 2048 bit keys.
    dh dh2048.pem

    # Configure server mode and supply a VPN subnet
    # for OpenVPN to draw client addresses from.
    # The server will take 10.8.0.1 for itself,
    # the rest will be made available to clients.
    # Each client will be able to reach the server
    # on 10.8.0.1. Comment this line out if you are
    # ethernet bridging. See the man page for more info.
    server 192.168.6.0 255.255.255.0

    # Maintain a record of client <-> virtual IP address
    # associations in this file.  If OpenVPN goes down or
    # is restarted, reconnecting clients can be assigned
    # the same virtual IP address from the pool that was
    # previously assigned.
    ifconfig-pool-persist ipp.txt

    # Configure server mode for ethernet bridging.
    # You must first use your OS's bridging capability
    # to bridge the TAP interface with the ethernet
    # NIC interface.  Then you must manually set the
    # IP/netmask on the bridge interface, here we
    # assume 10.8.0.4/255.255.255.0.  Finally we
    # must set aside an IP range in this subnet
    # (start=10.8.0.50 end=10.8.0.100) to allocate
    # to connecting clients.  Leave this line commented
    # out unless you are ethernet bridging.
    ;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100

    # Configure server mode for ethernet bridging
    # using a DHCP-proxy, where clients talk
    # to the OpenVPN server-side DHCP server
    # to receive their IP address allocation
    # and DNS server addresses.  You must first use
    # your OS's bridging capability to bridge the TAP
    # interface with the ethernet NIC interface.
    # Note: this mode only works on clients (such as
    # Windows), where the client-side TAP adapter is
    # bound to a DHCP client.
    ;server-bridge

    # Push routes to the client to allow it
    # to reach other private subnets behind
    # the server.  Remember that these
    # private subnets will also need
    # to know to route the OpenVPN client
    # address pool (10.8.0.0/255.255.255.0)
    # back to the OpenVPN server.
    push "route 192.168.10.0 255.255.255.0 192.168.10.1"
    push "route 192.168.5.0 255.255.255.0 192.168.5.10"
    ;push "route 192.168.1.0 255.255.255.0 192.168.1.2"

    # To assign specific IP addresses to specific
    # clients or if a connecting client has a private
    # subnet behind it that should also have VPN access,
    # use the subdirectory "ccd" for client-specific
    # configuration files (see man page for more info).

    # EXAMPLE: Suppose the client
    # having the certificate common name "Thelonious"
    # also has a small subnet behind his connecting
    # machine, such as 192.168.40.128/255.255.255.248.
    # First, uncomment out these lines:
    ;client-config-dir ccd
    ;route 192.168.40.128 255.255.255.248
    # Then create a file ccd/Thelonious with this line:
    #   iroute 192.168.40.128 255.255.255.248
    # This will allow Thelonious' private subnet to
    # access the VPN.  This example will only work
    # if you are routing, not bridging, i.e. you are
    # using "dev tun" and "server" directives.

    # EXAMPLE: Suppose you want to give
    # Thelonious a fixed VPN IP address of 10.9.0.1.
    # First uncomment out these lines:
    ;client-config-dir ccd
    ;route 10.9.0.0 255.255.255.252
    # Then add this line to ccd/Thelonious:
    #   ifconfig-push 10.9.0.1 10.9.0.2

    # Suppose that you want to enable different
    # firewall access policies for different groups
    # of clients.  There are two methods:
    # (1) Run multiple OpenVPN daemons, one for each
    #     group, and firewall the TUN/TAP interface
    #     for each group/daemon appropriately.
    # (2) (Advanced) Create a script to dynamically
    #     modify the firewall in response to access
    #     from different clients.  See man
    #     page for more info on learn-address script.
    ;learn-address ./script

    # If enabled, this directive will configure
    # all clients to redirect their default
    # network gateway through the VPN, causing
    # all IP traffic such as web browsing and
    # and DNS lookups to go through the VPN
    # (The OpenVPN server machine may need to NAT
    # or bridge the TUN/TAP interface to the internet
    # in order for this to work properly).
    ;push "redirect-gateway def1 bypass-dhcp"

    # Certain Windows-specific network settings
    # can be pushed to clients, such as DNS
    # or WINS server addresses.  CAVEAT:
    # http://openvpn.net/faq.html#dhcpcaveats
    # The addresses below refer to the public
    # DNS servers provided by opendns.com.
    push "dhcp-option DNS 192.168.1.2"
    ;push "dhcp-option DNS 192.168.1.103"

    # Uncomment this directive to allow different
    # clients to be able to "see" each other.
    # By default, clients will only see the server.
    # To force clients to only see the server, you
    # will also need to appropriately firewall the
    # server's TUN/TAP interface.
    client-to-client

    # Uncomment this directive if multiple clients
    # might connect with the same certificate/key
    # files or common names.  This is recommended
    # only for testing purposes.  For production use,
    # each client should have its own certificate/key
    # pair.
    #
    # IF YOU HAVE NOT GENERATED INDIVIDUAL
    # CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
    # EACH HAVING ITS OWN UNIQUE "COMMON NAME",
    # UNCOMMENT THIS LINE OUT.
    duplicate-cn

    # The keepalive directive causes ping-like
    # messages to be sent back and forth over
    # the link so that each side knows when
    # the other side has gone down.
    # Ping every 10 seconds, assume that remote
    # peer is down if no ping received during
    # a 120 second time period.
    keepalive 10 120

    # For extra security beyond that provided
    # by SSL/TLS, create an "HMAC firewall"
    # to help block DoS attacks and UDP port flooding.
    #
    # Generate with:
    #   openvpn --genkey --secret ta.key
    #
    # The server and each client must have
    # a copy of this key.
    # The second parameter should be '0'
    # on the server and '1' on the clients.
    ;tls-auth ta.key 0 # This file is secret

    # Select a cryptographic cipher.
    # This config item must be copied to
    # the client config file as well.
    ;cipher BF-CBC        # Blowfish (default)
    ;cipher AES-128-CBC   # AES
    ;cipher DES-EDE3-CBC  # Triple-DES

    # Enable compression on the VPN link.
    # If you enable it here, you must also
    # enable it in the client config file.
    comp-lzo

    # The maximum number of concurrently connected
    # clients we want to allow.
    max-clients 20

    # It's a good idea to reduce the OpenVPN
    # daemon's privileges after initialization.
    #
    # You can uncomment this out on
    # non-Windows systems.
    ;user nobody
    ;group nogroup

    # The persist options will try to avoid
    # accessing certain resources on restart
    # that may no longer be accessible because
    # of the privilege downgrade.
    persist-key
    persist-tun

    # Output a short status file showing
    # current connections, truncated
    # and rewritten every minute.
    status openvpn-status.log

    # By default, log messages will go to the syslog (or
    # on Windows, if running as a service, they will go to
    # the "\Program Files\OpenVPN\log" directory).
    # Use log or log-append to override this default.
    # "log" will truncate the log file on OpenVPN startup,
    # while "log-append" will append to it.  Use one
    # or the other (but not both).
    ;log         openvpn.log
    ;log-append  openvpn.log

    # Set the appropriate level of log
    # file verbosity.
    #
    # 0 is silent, except for fatal errors
    # 4 is reasonable for general usage
    # 5 and 6 can help to debug connection problems
    # 9 is extremely verbose
    verb 3

    # Silence repeating messages.  At most 20
    # sequential messages of the same message
    # category will be output to the log.
    ;mute 20

My ca.crt, server.crt, server.key, dh2048.pem and the server.conf are located in the /etc/openvpn dir.

Shorewall's interfaces file:

Code: Select all

    #ZONE   INTERFACE   BROADCAST   OPTIONS
    net     eth1            detect          dhcp,tcpflags,nosmurfs,routefilter,logmartians
    loc     eth0            detect          tcpflags,nosmurfs,routefilter,logmartians
    srv     eth2            detect      tcpflags,nosmurfs,routefilter,logmartians
    ovpn   tun0      detect

Shorewall's zones file:

Code: Select all

    #ZONE   TYPE   OPTIONS         IN         OUT
    #               OPTIONS         OPTIONS
    fw   firewall
    net   ipv4
    loc   ipv4
    srv   ipv4
    ovpn   ipv4

Shorewall's shorewall.conf file:

Code: Select all

    ###############################################################################
    #
    #  Shorewall Version 4 -- /etc/shorewall/shorewall.conf
    #
    #  For information about the settings in this file, type "man shorewall.conf"
    #
    #  Manpage also online at http://www.shorewall.net/manpages/shorewall.conf.html
    ###############################################################################
    #             S T A R T U P   E N A B L E D
    ###############################################################################

    STARTUP_ENABLED=Yes

    ###############################################################################
    #                    V E R B O S I T Y
    ###############################################################################

    VERBOSITY=1

    ###############################################################################
    #                L O G G I N G
    ###############################################################################

    LOGFILE=/var/log/messages

    STARTUP_LOG=/var/log/shorewall-init.log

    LOG_VERBOSITY=2

    LOGFORMAT="Shorewall:%s:%s:"

    LOGTAGONLY=No

    LOGLIMIT=

    LOGALLNEW=

    BLACKLIST_LOGLEVEL=

    MACLIST_LOG_LEVEL=info

    TCP_FLAGS_LOG_LEVEL=info

    SMURF_LOG_LEVEL=info

    LOG_MARTIANS=Yes

    ###############################################################################
    #   L O C A T I O N     O F   F I L E S   A N D   D I R E C T O R I E S
    ###############################################################################

    IPTABLES=

    IP=

    TC=

    IPSET=

    PERL=/usr/bin/perl

    PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin

    SHOREWALL_SHELL=/bin/sh

    SUBSYSLOCK=""

    MODULESDIR=

    CONFIG_PATH=/etc/shorewall:/usr/share/shorewall

    RESTOREFILE=

    IPSECFILE=zones

    LOCKFILE=

    ###############################################################################
    #      D E F A U L T   A C T I O N S / M A C R O S
    ###############################################################################

    DROP_DEFAULT="Drop"
    REJECT_DEFAULT="Reject"
    ACCEPT_DEFAULT="none"
    QUEUE_DEFAULT="none"
    NFQUEUE_DEFAULT="none"

    ###############################################################################
    #                        R S H / R C P  C O M M A N D S
    ###############################################################################

    RSH_COMMAND='ssh ${root}@${system} ${command}'
    RCP_COMMAND='scp ${files} ${root}@${system}:${destination}'

    ###############################################################################
    #         F I R E W A L L     O P T I O N S
    ###############################################################################

    IP_FORWARDING=On

    ADD_IP_ALIASES=No

    ADD_SNAT_ALIASES=No

    RETAIN_ALIASES=No

    TC_ENABLED=Internal

    TC_EXPERT=No

    TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2"

    CLEAR_TC=Yes

    MARK_IN_FORWARD_CHAIN=No

    CLAMPMSS=No

    ROUTE_FILTER=Yes

    DETECT_DNAT_IPADDRS=No

    MUTEX_TIMEOUT=60

    ADMINISABSENTMINDED=Yes

    BLACKLISTNEWONLY=Yes

    MODULE_SUFFIX=ko

    DISABLE_IPV6=No

    DYNAMIC_ZONES=No

    PKTTYPE=Yes

    NULL_ROUTE_RFC1918=No

    MACLIST_TABLE=filter

    MACLIST_TTL=

    SAVE_IPSETS=No

    MAPOLDACTIONS=No

    FASTACCEPT=No

    IMPLICIT_CONTINUE=No

    HIGH_ROUTE_MARKS=No

    OPTIMIZE=0

    EXPORTPARAMS=Yes

    EXPAND_POLICIES=Yes

    KEEP_RT_TABLES=No

    DELETE_THEN_ADD=Yes

    MULTICAST=No

    DONT_LOAD=

    AUTO_COMMENT=Yes

    MANGLE_ENABLED=Yes

    USE_DEFAULT_RT=No

    RESTORE_DEFAULT_ROUTE=Yes

    AUTOMAKE=No

    WIDE_TC_MARKS=No

    TRACK_PROVIDERS=No

    ZONE2ZONE=2

    ACCOUNTING=Yes

    DYNAMIC_BLACKLIST=Yes

    OPTIMIZE_ACCOUNTING=No

    LOAD_HELPERS_ONLY=No

    REQUIRE_INTERFACE=No

    FORWARD_CLEAR_MARK=

    COMPLETE=No

    ###############################################################################
    #         P A C K E T   D I S P O S I T I O N
    ###############################################################################

    BLACKLIST_DISPOSITION=DROP

    MACLIST_DISPOSITION=REJECT

    TCP_FLAGS_DISPOSITION=DROP

    #LAST LINE -- DO NOT REMOVE

Shorewall's masq file:

Code: Select all

    #
    # Shorewall version 3.4 - Sample Masq file for three-interface configuration.
    # Copyright (C) 2006,2007 by the Shorewall Team
    #
    # This library is free software; you can redistribute it and/or
    # modify it under the terms of the GNU Lesser General Public
    # License as published by the Free Software Foundation; either
    # version 2.1 of the License, or (at your option) any later version.
    #
    # See the file README.txt for further details.
    #------------------------------------------------------------------------------
    # For information about entries in this file, type "man shorewall-masq"
    ##############################################################################
    #INTERFACE      SOURCE      ADDRESS      PROTO   PORT(S)   IPSEC   MARK
    eth1         10.0.0.0/8,\
             169.254.0.0/16,\
             172.16.0.0/12,\
             192.168.0.0/16,\
             192.168.10.0/24,\
             192.168.5.0/24

Shorewall's rules file:

Code: Select all

#------------------------------------------------------------------------------------------------------------
    # For information about entries in this file, type "man shorewall-rules"
    #############################################################################################################
    #ACTION      SOURCE      DEST      PROTO   DEST   SOURCE      ORIGINAL   RATE      USER/   MARK
    #                     PORT   PORT(S)      DEST      LIMIT      GROUP

    #   Accept DNS connections from the firewall to the Internet

    DNS(ACCEPT)   $FW      net

    #   Accept SSH connections from the local network to the firewall and SRV

    SSH(ACCEPT)     loc             $FW
    SSH(ACCEPT)     loc             srv

    #   SRV and Local DNS access to the Internet and to the firewall

    DNS(ACCEPT)   srv      net
    DNS(ACCEPT)   loc      net
    DNS(ACCEPT)   srv      $FW
    DNS(ACCEPT)   loc      $FW

    # Drop Ping from the "bad" net zone.

    Ping(DROP)      net             $FW

    #       Make ping work bi-directionally between the srv, net, Firewall and local zone
    #       (assumes that the loc-> net policy is ACCEPT).

    Ping(ACCEPT)    loc             $FW
    Ping(ACCEPT)    srv             $FW
    Ping(ACCEPT)    loc             srv
    Ping(ACCEPT)    srv             loc
    Ping(ACCEPT)    srv             net
    Ping(ACCEPT)    ovpn            net
    Ping(ACCEPT)    ovpn            loc
    Ping(ACCEPT)    ovpn            $FW
    Ping(ACCEPT)    ovpn            srv
    ACCEPT      $FW      net      icmp
    ACCEPT      $FW      loc      icmp
    ACCEPT      $FW      srv      icmp

    #    Accept internet connections HTTP,HTTPS,FTP,SFTP,SEFTP and HTTPS 443

    ACCEPT      loc      net      tcp   www,https,ftp
    ACCEPT      loc      net      tcp   80,8080,443
    ACCEPT      loc      net      tcp   20,21,22,990,49152:65535
    ACCEPT      loc      net      udp   21

    ACCEPT      srv      net      tcp   www,https,ftp
    ACCEPT      srv      net      tcp   80,8080,443
    ACCEPT      srv      net      tcp   20,21,22,990,49152:65535
    ACCEPT      srv      net      udp   21

    ACCEPT      net      srv      tcp   www,https,ftp
    ACCEPT      net      srv      tcp   80,8080,443

    ACCEPT      $FW      net      tcp   80,8080,443
    ACCEPT      $FW      net      tcp   20,21,22,990

    #    Remote controll connections

    ACCEPT       loc      $FW      tcp   9987,5900,5901
    ACCEPT       loc      $FW      udp   9987

    ACCEPT      net      $FW      tcp   9987,5900,5901,10011,30033
    ACCEPT      net      $FW      udp   9987

    ACCEPT       loc      net      tcp   9987
    ACCEPT       loc      net      udp   9987

    ACCEPT      loc      net      tcp   3380:3389
    ACCEPT      loc      srv      tcp   3380:3389
    ACCEPT      net      loc      tcp   3380:3389
    ACCEPT      net      srv      tcp   3380:3389
    ACCEPT      net      $FW      tcp   3380:3389
    ACCEPT      $FW      srv      tcp   3380:3389

    ACCEPT      loc      net      udp   1194
    ACCEPT      loc      $FW      udp   1194
    ACCEPT      $FW      loc      udp   1194
    ACCEPT      net      $FW      udp   1194

    #    Parcelware

    ACCEPT      loc      net      tcp   55174,1434
    ACCEPT      loc      net      udp   1434

    #   Filemaker

    ACCEPT       loc      srv      tcp   80,5003,16000,16001,16016,16018,2399,16006,16008
    ACCEPT       loc      srv      tcp   16010,16012,16014,16004,50003,50006,5013

    #   Overige

    ACCEPT      loc      loc      tcp   88
    ACCEPT      loc      loc      udp   88
    ACCEPT      srv      loc      tcp   88
    ACCEPT      srv      loc      udp   88

    ACCEPT      loc      srv      tcp   445
    ACCEPT      $FW      srv      tcp   445
    ACCEPT      srv      $FW      tcp   445
    ACCEPT      loc      $FW      tcp   445

    ACCEPT      ovpn      loc
    ACCEPT      ovpn      srv
    ACCEPT      ovpn      $FW
    ACCEPT      ovpn      net

    #########################################################################
    #         PORT FORWARDING               #
    #########################################################################

    DNAT       net       srv:192.168.5.10:3389    tcp    3380
    DNAT       net       srv:192.168.5.1:3389    tcp    3381
    DNAT       net       srv:192.168.5.2:3389    tcp    3382
    DNAT       net       srv:192.168.5.3:3389    tcp    3383
    DNAT       net       srv:192.168.5.4:3389    tcp    3384
    DNAT       net       srv:192.168.5.5:3389    tcp    3385
    DNAT       net       srv:192.168.5.6:3389    tcp    3386
    DNAT       net       srv:192.168.5.7:3389    tcp    3387
    DNAT       net       srv:192.168.5.8:3389    tcp    3388
    DNAT       net       srv:192.168.5.9:3389    tcp    3389

    # ARTIX
    DNAT       net       srv:192.168.5.1    tcp    1434,443,55174
    DNAT       net       srv:192.168.5.1    udp    1434
    # VOLCARN
    DNAT       net       srv:192.168.5.2    tcp    20,21,22,990
    DNAT       net       srv:192.168.5.2    udp   21

Maybe the routing tables and the log from openvpn gui will provide some answers to?

Routing table Win 7:

Code: Select all

    C:\Windows\system32>route print
    ===========================================================================
    Interface List
    20...00 ff e7 24 86 b2 ......TAP-Win32 Adapter V9
    11...90 e6 ba 19 95 26 ......Realtek PCI GBE Family Controller
      1...........................Software Loopback Interface 1
    13...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
    12...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
    14...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
    ===========================================================================

    IPv4 Route Table
    ===========================================================================
    Active Routes:
    Network Destination        Netmask          Gateway       Interface  Metric
              0.0.0.0          0.0.0.0      192.168.1.1    192.168.1.100     10
            127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
            127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
      127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
          169.254.0.0      255.255.0.0    192.168.1.102    192.168.1.100     11
          192.168.1.0    255.255.255.0         On-link     192.168.1.100    266
        192.168.1.100  255.255.255.255         On-link     192.168.1.100    266
        192.168.1.255  255.255.255.255         On-link     192.168.1.100    266
          192.168.6.4  255.255.255.252         On-link       192.168.6.6    286
          192.168.6.6  255.255.255.255         On-link       192.168.6.6    286
          192.168.6.7  255.255.255.255         On-link       192.168.6.6    286
            224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
            224.0.0.0        240.0.0.0         On-link     192.168.1.100    266
            224.0.0.0        240.0.0.0         On-link       192.168.6.6    286
      255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
      255.255.255.255  255.255.255.255         On-link     192.168.1.100    266
      255.255.255.255  255.255.255.255         On-link       192.168.6.6    286
    ===========================================================================
    Persistent Routes:
      Network Address          Netmask  Gateway Address  Metric
          169.254.0.0      255.255.0.0    192.168.1.102       1
    ===========================================================================

    IPv6 Route Table
    ===========================================================================
    Active Routes:
    If Metric Network Destination      Gateway
    12     58 ::/0                     On-link
      1    306 ::1/128                  On-link
    12     58 2001::/32                On-link
    12    306 2001:0:5ef5:79fd:cfa:2a3b:a9ae:4fb9/128
                                        On-link
    11    266 fe80::/64                On-link
    20    286 fe80::/64                On-link
    12    306 fe80::/64                On-link
    12    306 fe80::cfa:2a3b:a9ae:4fb9/128
                                        On-link
    11    266 fe80::3182:d01c:ff9d:b8eb/128
                                        On-link
    20    286 fe80::d807:f4f:986f:396b/128
                                        On-link
      1    306 ff00::/8                 On-link
    12    306 ff00::/8                 On-link
    11    266 ff00::/8                 On-link
    20    286 ff00::/8                 On-link
    ===========================================================================
    Persistent Routes:
      None

OpenVPN GUI log Win 7:

Code: Select all

    Mon Mar 07 10:18:39 2011 OpenVPN 2.0.9 Win32-MinGW [SSL] [LZO] built on Oct  1 2006
    Mon Mar 07 10:18:39 2011 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA.  OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
    Mon Mar 07 10:18:39 2011 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
    Mon Mar 07 10:18:45 2011 LZO compression initialized
    Mon Mar 07 10:18:45 2011 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
    Mon Mar 07 10:18:45 2011 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
    Mon Mar 07 10:18:45 2011 Local Options hash (VER=V4): '41690919'
    Mon Mar 07 10:18:45 2011 Expected Remote Options hash (VER=V4): '530fdded'
    Mon Mar 07 10:18:45 2011 UDPv4 link local: [undef]
    Mon Mar 07 10:18:45 2011 UDPv4 link remote: *.*.*.*:1194 <------ filtered by me 
    Mon Mar 07 10:18:45 2011 TLS: Initial packet from *.*.*.*:1194, sid=d4e56912 111f5859 <------ filtered by me 
    Mon Mar 07 10:18:46 2011 VERIFY OK: depth=1, /C=NL/ST=ZH/L=Barendrecht/O=Outdoor_XL/OU=Dragonwall/CN=dragonwall.oxl.local/name=Jonathan_Burgerhout/emailAddress=info@outdoorxl.nl
    Mon Mar 07 10:18:46 2011 VERIFY OK: depth=0, /C=NL/ST=Zuid-Holland/L=Barendrecht/O=Outdoor_XL/OU=Dragonwall/CN=dragonwall.oxl.local/name=Jonathan_Burgerhout/emailAddress=info@outdoorxl.nl
    Mon Mar 07 10:18:47 2011 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
    Mon Mar 07 10:18:47 2011 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
    Mon Mar 07 10:18:47 2011 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
    Mon Mar 07 10:18:47 2011 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
    Mon Mar 07 10:18:47 2011 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
    Mon Mar 07 10:18:47 2011 [dragonwall.oxl.local] Peer Connection Initiated with *.*.*.*:1194 <------ filtered by me 
    Mon Mar 07 10:18:48 2011 SENT CONTROL [dragonwall.oxl.local]: 'PUSH_REQUEST' (status=1)
    Mon Mar 07 10:18:48 2011 PUSH: Received control message: 'PUSH_REPLY,route 192.168.10.0 255.255.255.0 192.168.10.1,route 192.168.5.0 255.255.255.0 192.168.5.10,route 192.168.1.0 255.255.255.0 192.168.1.2,dhcp-option DNS 192.168.1.2,dhcp-option DNS 192.168.1.103,route 192.168.6.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 192.168.6.6 192.168.6.5'
    Mon Mar 07 10:18:48 2011 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:7: topology (2.0.9)
    Mon Mar 07 10:18:48 2011 OPTIONS IMPORT: timers and/or timeouts modified
    Mon Mar 07 10:18:48 2011 OPTIONS IMPORT: --ifconfig/up options modified
    Mon Mar 07 10:18:48 2011 OPTIONS IMPORT: route options modified
    Mon Mar 07 10:18:48 2011 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
    Mon Mar 07 10:18:48 2011 CreateFile failed on TAP device: \\.\Global\{857E59F1-EDE8-4FA4-B359-77A5D620820F}.tap
    Mon Mar 07 10:18:48 2011 All TAP-Win32 adapters on this system are currently in use.
    Mon Mar 07 10:18:48 2011 Exiting

Routing table Debian:

Code: Select all

    Dragonwall:/media/samba# route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    192.168.6.2     0.0.0.0         255.255.255.255 UH    0      0        0 tun0
    192.168.6.0     192.168.6.2     255.255.255.0   UG    0      0        0 tun0
    192.168.5.0     0.0.0.0         255.255.255.0   U     0      0        0 eth2
    192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
    192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
    0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1

I think this is all of the important information that I have. If there is more information that you need please say so and I will provide it and excuse me for my English.

When I add a test client on the client side or on the server side, it can reach everything so that means that those two zones are being routed correctly ... I think :?

I really hope that someone can help me out here .... it's probably a simple IP address that i have forgotten to put in somewhere.

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

Re: OpenVPN on Debian doesn't want to route?

Post by maikcat » Wed Mar 09, 2011 10:11 am

hi there,

first please strip out the comments from openvpn config files for easier reading.
second use openvpn 1.4 to your win 7 and run openvpn with admin rights
third disable (if you can) firewall rules so it is easier to test the config.

cheers,

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"

jonathanb
OpenVpn Newbie
Posts: 8
Joined: Wed Mar 09, 2011 8:38 am

Re: OpenVPN on Debian doesn't want to route?

Post by jonathanb » Wed Mar 09, 2011 10:30 am

Thank you for the fast reply!

I don't really understand you I think.
Do you mean that i need to use another version of the OpenVPN GuI that i use on the Win 7 or do you mean that i need to remove the OpenVPN server and reinstall an older one the 2.1.4. version? Is there something wrong with this version of OpenVPN?

The firewall was later turned of and it didn't work unfortunately. The comments will be deleted when everything works smoothly but as you can see it doesn't do that now. :D
Last edited by jonathanb on Wed Mar 09, 2011 10:52 am, edited 1 time in total.

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

Re: OpenVPN on Debian doesn't want to route?

Post by maikcat » Wed Mar 09, 2011 10:49 am

hi there,

which openvpn version you installed on win7 pc?
if it is not 1.4,please upgrade.

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"

jonathanb
OpenVpn Newbie
Posts: 8
Joined: Wed Mar 09, 2011 8:38 am

Re: OpenVPN on Debian doesn't want to route?

Post by jonathanb » Wed Mar 09, 2011 11:11 am

Hey Maikcat,

The server has now 2.1.4. installed and i'm still looking for the 2.1.4. version of the client for Win 7. I really hope that this is just a bug.

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

Re: OpenVPN on Debian doesn't want to route?

Post by maikcat » Wed Mar 09, 2011 11:17 am

i know that openvpn 2.0.9 has problems with vista...

download it from here:

http://swupdate.openvpn.net/community/r ... nstall.exe

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"

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: OpenVPN on Debian doesn't want to route?

Post by janjust » Wed Mar 09, 2011 11:23 am

openvpn 2.0.9 will not work with Windows Vista or 7 ; use openvpn 2.1.4 for that. you can download it from here:
http://openvpn.net/index.php/open-source/downloads.html

jonathanb
OpenVpn Newbie
Posts: 8
Joined: Wed Mar 09, 2011 8:38 am

Re: OpenVPN on Debian doesn't want to route?

Post by jonathanb » Wed Mar 09, 2011 11:27 am

Thank you Maikcat and Janjust, but it didn't work. I forgot to post my network so here it is in the hope it makes my mistakes more clear.

Image

This is the log on the Win 7 Client:

Code: Select all

Wed Mar 09 12:28:30 2011 OpenVPN 2.1.4 i686-pc-mingw32 [SSL] [LZO2] [PKCS11] built on Nov  8 2010
Wed Mar 09 12:28:30 2011 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Wed Mar 09 12:28:30 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed Mar 09 12:28:36 2011 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Wed Mar 09 12:28:36 2011 LZO compression initialized
Wed Mar 09 12:28:36 2011 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Wed Mar 09 12:28:36 2011 Socket Buffers: R=[8192->8192] S=[32767->32767]
Wed Mar 09 12:28:36 2011 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Mar 09 12:28:36 2011 Local Options hash (VER=V4): '41690919'
Wed Mar 09 12:28:36 2011 Expected Remote Options hash (VER=V4): '530fdded'
Wed Mar 09 12:28:36 2011 UDPv4 link local: [undef]
Wed Mar 09 12:28:36 2011 UDPv4 link remote: #.#.#.#:1194
Wed Mar 09 12:28:36 2011 TLS: Initial packet from #.#.#.#:1194, sid=3fcd2083 ea8e877d
Wed Mar 09 12:28:36 2011 VERIFY OK: depth=1, /C=NL/ST=ZH/L=Barendrecht/O=Outdoor_XL/OU=Dragonwall/CN=dragonwall.oxl.local/name=Jonathan_Burgerhout/emailAddress=info@outdoorxl.nl
Wed Mar 09 12:28:36 2011 VERIFY OK: depth=0, /C=NL/ST=Zuid-Holland/L=Barendrecht/O=Outdoor_XL/OU=Dragonwall/CN=dragonwall.oxl.local/name=Jonathan_Burgerhout/emailAddress=info@outdoorxl.nl
Wed Mar 09 12:28:37 2011 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Mar 09 12:28:37 2011 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Mar 09 12:28:37 2011 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Mar 09 12:28:37 2011 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Mar 09 12:28:37 2011 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Wed Mar 09 12:28:37 2011 [dragonwall.oxl.local] Peer Connection Initiated with #.#.#.#:1194
Wed Mar 09 12:28:39 2011 SENT CONTROL [dragonwall.oxl.local]: 'PUSH_REQUEST' (status=1)
Wed Mar 09 12:28:39 2011 PUSH: Received control message: 'PUSH_REPLY,route 192.168.10.0 255.255.255.0 192.168.10.1,route 192.168.5.0 255.255.255.0 192.168.5.10,route 192.168.6.0 255.255.255.0,dhcp-option DNS 192.168.1.2,route 192.168.6.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 192.168.6.6 192.168.6.5'
Wed Mar 09 12:28:39 2011 OPTIONS IMPORT: timers and/or timeouts modified
Wed Mar 09 12:28:39 2011 OPTIONS IMPORT: --ifconfig/up options modified
Wed Mar 09 12:28:39 2011 OPTIONS IMPORT: route options modified
Wed Mar 09 12:28:39 2011 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Wed Mar 09 12:28:39 2011 ROUTE default_gateway=192.168.1.1
Wed Mar 09 12:28:39 2011 TAP-WIN32 device [Local Area Connection 4] opened: \\.\Global\{A3F2A844-01E3-42A5-8AC1-29AF19553905}.tap
Wed Mar 09 12:28:39 2011 TAP-Win32 Driver Version 9.7 
Wed Mar 09 12:28:39 2011 TAP-Win32 MTU=1500
Wed Mar 09 12:28:39 2011 Notified TAP-Win32 driver to set a DHCP IP/netmask of 192.168.6.6/255.255.255.252 on interface {A3F2A844-01E3-42A5-8AC1-29AF19553905} [DHCP-serv: 192.168.6.5, lease-time: 31536000]
Wed Mar 09 12:28:39 2011 Successful ARP Flush on interface [29] {A3F2A844-01E3-42A5-8AC1-29AF19553905}
Wed Mar 09 12:28:44 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:28:44 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:28:50 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:28:50 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:28:51 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:28:51 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:28:52 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:28:52 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:28:53 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:28:53 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:28:54 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:28:54 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:28:55 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:28:55 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:28:56 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:28:56 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:28:57 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:28:57 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:28:58 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:28:58 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:28:59 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:28:59 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:29:00 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:29:00 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:29:01 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:29:01 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:29:02 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:29:02 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:29:03 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:29:03 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:29:05 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:29:05 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:29:06 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:29:06 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:29:07 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:29:07 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:29:08 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:29:08 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:29:09 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:29:09 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:29:10 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:29:10 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:29:11 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:29:11 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:29:12 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:29:12 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 12:29:14 2011 TEST ROUTES: 2/4 succeeded len=4 ret=0 a=0 u/d=up
Wed Mar 09 12:29:14 2011 C:\WINDOWS\system32\route.exe ADD 192.168.10.0 MASK 255.255.255.0 192.168.10.1
Wed Mar 09 12:29:14 2011 Warning: route gateway is not reachable on any active network adapters: 192.168.10.1
Wed Mar 09 12:29:14 2011 Route addition via IPAPI failed [adaptive]
Wed Mar 09 12:29:14 2011 Route addition fallback to route.exe
 OK!
Wed Mar 09 12:29:14 2011 C:\WINDOWS\system32\route.exe ADD 192.168.5.0 MASK 255.255.255.0 192.168.5.10
Wed Mar 09 12:29:14 2011 Warning: route gateway is not reachable on any active network adapters: 192.168.5.10
Wed Mar 09 12:29:14 2011 Route addition via IPAPI failed [adaptive]
Wed Mar 09 12:29:14 2011 Route addition fallback to route.exe
 OK!
Wed Mar 09 12:29:14 2011 C:\WINDOWS\system32\route.exe ADD 192.168.6.0 MASK 255.255.255.0 192.168.6.5
Wed Mar 09 12:29:14 2011 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=30 and dwForwardType=4
Wed Mar 09 12:29:14 2011 Route addition via IPAPI succeeded [adaptive]
Wed Mar 09 12:29:14 2011 C:\WINDOWS\system32\route.exe ADD 192.168.6.0 MASK 255.255.255.0 192.168.6.5
Wed Mar 09 12:29:14 2011 ROUTE: route addition failed using CreateIpForwardEntry: The object already exists.   [status=5010 if_index=29]
Wed Mar 09 12:29:14 2011 Route addition via IPAPI failed [adaptive]
Wed Mar 09 12:29:14 2011 Route addition fallback to route.exe
The route addition failed: The object already exists.
SYSTEM ROUTING TABLE
0.0.0.0 0.0.0.0 192.168.1.1 p=0 i=11 t=4 pr=3 a=6725 h=0 m=276/0/0/0/0
127.0.0.0 255.0.0.0 127.0.0.1 p=0 i=1 t=3 pr=3 a=599875 h=0 m=306/0/0/0/0
127.0.0.1 255.255.255.255 127.0.0.1 p=0 i=1 t=3 pr=3 a=599875 h=0 m=306/0/0/0/0
127.255.255.255 255.255.255.255 127.0.0.1 p=0 i=1 t=3 pr=3 a=599875 h=0 m=306/0/0/0/0
169.254.0.0 255.255.0.0 192.168.1.44 p=0 i=11 t=3 pr=3 a=32 h=0 m=296/0/0/0/0
169.254.255.255 255.255.255.255 192.168.1.44 p=0 i=11 t=3 pr=3 a=32 h=0 m=276/0/0/0/0
192.168.1.0 255.255.255.0 192.168.1.44 p=0 i=11 t=3 pr=3 a=6722 h=0 m=276/0/0/0/0
192.168.1.44 255.255.255.255 192.168.1.44 p=0 i=11 t=3 pr=3 a=6722 h=0 m=276/0/0/0/0
192.168.1.255 255.255.255.255 192.168.1.44 p=0 i=11 t=3 pr=3 a=6722 h=0 m=276/0/0/0/0
192.168.5.0 255.255.255.0 192.168.5.10 p=0 i=11 t=4 pr=3 a=0 h=0 m=21/0/0/0/0
192.168.6.0 255.255.255.0 192.168.6.5 p=0 i=29 t=4 pr=3 a=0 h=0 m=30/0/0/0/0
192.168.6.4 255.255.255.252 192.168.6.6 p=0 i=29 t=3 pr=3 a=34 h=0 m=286/0/0/0/0
192.168.6.6 255.255.255.255 192.168.6.6 p=0 i=29 t=3 pr=3 a=34 h=0 m=286/0/0/0/0
192.168.6.7 255.255.255.255 192.168.6.6 p=0 i=29 t=3 pr=3 a=34 h=0 m=286/0/0/0/0
192.168.10.0 255.255.255.0 192.168.10.1 p=0 i=11 t=4 pr=3 a=0 h=0 m=21/0/0/0/0
224.0.0.0 240.0.0.0 127.0.0.1 p=0 i=1 t=3 pr=3 a=599875 h=0 m=306/0/0/0/0
224.0.0.0 240.0.0.0 192.168.1.44 p=0 i=11 t=3 pr=3 a=10639 h=0 m=276/0/0/0/0
224.0.0.0 240.0.0.0 192.168.6.6 p=0 i=29 t=3 pr=3 a=101 h=0 m=286/0/0/0/0
255.255.255.255 255.255.255.255 127.0.0.1 p=0 i=1 t=3 pr=3 a=599875 h=0 m=306/0/0/0/0
255.255.255.255 255.255.255.255 192.168.1.44 p=0 i=11 t=3 pr=3 a=10639 h=0 m=276/0/0/0/0
255.255.255.255 255.255.255.255 192.168.6.6 p=0 i=29 t=3 pr=3 a=101 h=0 m=286/0/0/0/0
SYSTEM ADAPTER LIST
TAP-Win32 Adapter V9
  Index = 29
  GUID = {A3F2A844-01E3-42A5-8AC1-29AF19553905}
  IP = 192.168.6.6/255.255.255.252 
  MAC = 00:ff:a3:f2:a8:44
  GATEWAY = 0.0.0.0/255.255.255.255 
  DHCP SERV = 192.168.6.5/255.255.255.255 
  DHCP LEASE OBTAINED = Wed Mar 09 12:28:39 2011
  DHCP LEASE EXPIRES  = Thu Mar 08 12:28:39 2012
  DNS SERV = 192.168.1.2/255.255.255.255 
Realtek RTL8102E/RTL8103E Family PCI-E Fast Ethernet NIC (NDIS 6.20)
  Index = 11
  GUID = {74EAB376-FFA8-4084-8BB5-E4F8662B640E}
  IP = 192.168.1.44/255.255.255.0 
  MAC = d4:85:64:05:c5:e7
  GATEWAY = 192.168.1.1/255.255.255.255 
  DNS SERV = 192.168.1.1/255.255.255.255 
Wed Mar 09 12:29:14 2011 Initialization Sequence Completed With Errors ( see http://openvpn.net/faq.html#dhcpclientserv )

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: OpenVPN on Debian doesn't want to route?

Post by janjust » Wed Mar 09, 2011 11:34 am

the server config file you posted does not seem to be the same as the one used in the client output. If I read
PUSH_REPLY,route 192.168.10.0 255.255.255.0 192.168.10.1,route 192.168.5.0 255.255.255.0 192.168.5.10,route 192.168.6.0 255.255.255.0,dhcp-option DNS 192.168.1.2,route 192.168.6.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 192.168.6.6 192.168.6.5'
correctly then your server config contained lines of the form

Code: Select all

push "route 192.168.5.0 255.255.255.0 192.168.5.10"
push "route 192.168.10.0 255.255.255.0 192.168.10.1"
Change this to

Code: Select all

push "route 192.168.5.0 255.255.255.0"
push "route 192.168.10.0 255.255.255.0"
and try again; also make sure the default GWs on the 192.168.{5,10}.0/24 networks know that traffic coming from 192.168.6.0/24 needs to go back to the openvpn server.

jonathanb
OpenVpn Newbie
Posts: 8
Joined: Wed Mar 09, 2011 8:38 am

Re: OpenVPN on Debian doesn't want to route?

Post by jonathanb » Wed Mar 09, 2011 11:48 am

Hey Janjust,

Those two push routes were indeed part of the problem because now my log from Win 7 doesn't retry those routes.

Code: Select all

Wed Mar 09 12:47:13 2011 OpenVPN 2.1.4 i686-pc-mingw32 [SSL] [LZO2] [PKCS11] built on Nov  8 2010
Wed Mar 09 12:47:13 2011 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Wed Mar 09 12:47:13 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed Mar 09 12:47:19 2011 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Wed Mar 09 12:47:19 2011 LZO compression initialized
Wed Mar 09 12:47:19 2011 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Wed Mar 09 12:47:19 2011 Socket Buffers: R=[8192->8192] S=[32767->32767]
Wed Mar 09 12:47:19 2011 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Mar 09 12:47:19 2011 Local Options hash (VER=V4): '41690919'
Wed Mar 09 12:47:19 2011 Expected Remote Options hash (VER=V4): '530fdded'
Wed Mar 09 12:47:19 2011 UDPv4 link local: [undef]
Wed Mar 09 12:47:19 2011 UDPv4 link remote: x.x.x.x:1194
Wed Mar 09 12:47:19 2011 TLS: Initial packet from x.x.x.x:1194, sid=6f5f257b 944509cf
Wed Mar 09 12:47:19 2011 VERIFY OK: depth=1, /C=NL/ST=ZH/L=Barendrecht/O=Outdoor_XL/OU=Dragonwall/CN=dragonwall.oxl.local/name=Jonathan_Burgerhout/emailAddress=info@outdoorxl.nl
Wed Mar 09 12:47:19 2011 VERIFY OK: depth=0, /C=NL/ST=Zuid-Holland/L=Barendrecht/O=Outdoor_XL/OU=Dragonwall/CN=dragonwall.oxl.local/name=Jonathan_Burgerhout/emailAddress=info@outdoorxl.nl
Wed Mar 09 12:47:20 2011 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Mar 09 12:47:20 2011 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Mar 09 12:47:20 2011 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Mar 09 12:47:20 2011 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Mar 09 12:47:20 2011 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Wed Mar 09 12:47:20 2011 [dragonwall.oxl.local] Peer Connection Initiated with x.x.x.x:1194
Wed Mar 09 12:47:22 2011 SENT CONTROL [dragonwall.oxl.local]: 'PUSH_REQUEST' (status=1)
Wed Mar 09 12:47:22 2011 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS 192.168.1.2,route 192.168.6.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 192.168.6.6 192.168.6.5'
Wed Mar 09 12:47:22 2011 OPTIONS IMPORT: timers and/or timeouts modified
Wed Mar 09 12:47:22 2011 OPTIONS IMPORT: --ifconfig/up options modified
Wed Mar 09 12:47:22 2011 OPTIONS IMPORT: route options modified
Wed Mar 09 12:47:22 2011 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Wed Mar 09 12:47:22 2011 ROUTE default_gateway=192.168.1.1
Wed Mar 09 12:47:22 2011 TAP-WIN32 device [Local Area Connection 4] opened: \\.\Global\{A3F2A844-01E3-42A5-8AC1-29AF19553905}.tap
Wed Mar 09 12:47:22 2011 TAP-Win32 Driver Version 9.7 
Wed Mar 09 12:47:22 2011 TAP-Win32 MTU=1500
Wed Mar 09 12:47:22 2011 Notified TAP-Win32 driver to set a DHCP IP/netmask of 192.168.6.6/255.255.255.252 on interface {A3F2A844-01E3-42A5-8AC1-29AF19553905} [DHCP-serv: 192.168.6.5, lease-time: 31536000]
Wed Mar 09 12:47:22 2011 Successful ARP Flush on interface [29] {A3F2A844-01E3-42A5-8AC1-29AF19553905}
Wed Mar 09 12:47:27 2011 TEST ROUTES: 1/1 succeeded len=1 ret=1 a=0 u/d=up
Wed Mar 09 12:47:27 2011 C:\WINDOWS\system32\route.exe ADD 192.168.6.0 MASK 255.255.255.0 192.168.6.5
Wed Mar 09 12:47:27 2011 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=30 and dwForwardType=4
Wed Mar 09 12:47:27 2011 Route addition via IPAPI succeeded [adaptive]
Wed Mar 09 12:47:27 2011 Initialization Sequence Completed
Although my client accept those routes, it still doesn't want to ping the other zones.
This can be because what you just said:
and try again; also make sure the default GWs on the 192.168.{5,10}.0/24 networks know that traffic coming from 192.168.6.0/24 needs to go back to the openvpn server.
I will have a look on those default gateways.
Last edited by jonathanb on Wed Mar 23, 2011 10:29 am, edited 1 time in total.

jonathanb
OpenVpn Newbie
Posts: 8
Joined: Wed Mar 09, 2011 8:38 am

Re: OpenVPN on Debian doesn't want to route?

Post by jonathanb » Wed Mar 09, 2011 12:49 pm

My routing table on the Debian server is:

Code: Select all

Dragonwall:~/Desktop# ip route show
192.168.6.2 dev tun0  proto kernel  scope link  src 192.168.6.1 
192.168.6.0/24 via 192.168.6.2 dev tun0 
192.168.5.0/24 via 192.168.6.2 dev tun0 
192.168.5.0/24 dev eth2  proto kernel  scope link  src 192.168.5.10 
192.168.1.0/24 dev eth1  proto kernel  scope link  src 192.168.1.2 
192.168.10.0/24 via 192.168.6.2 dev tun0 
192.168.10.0/24 dev eth0  proto kernel  scope link  src 192.168.10.1 
default via 192.168.1.1 dev eth1 
Which means that the traffic is being send to the right NIC.
This is right so in my theory it must work, but it still doesn't.

Any idea's?

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: OpenVPN on Debian doesn't want to route?

Post by janjust » Wed Mar 09, 2011 2:00 pm

if I read the client log correctly you've completely removed the 'push route' statements : they *ARE* needed, it's just that you should not have supplied a gateway (as I previously already stated)

jonathanb
OpenVpn Newbie
Posts: 8
Joined: Wed Mar 09, 2011 8:38 am

Re: OpenVPN on Debian doesn't want to route?

Post by jonathanb » Wed Mar 09, 2011 2:28 pm

Ow I see because without them the VPN client doesn't have those routs in his routing table. That was stupid from me but when i add them it still can't connect to those other zones.

server.conf without those #####:

Code: Select all

local 192.168.1.2
port 1194
proto udp
dev tun

ca ca.crt
cert server.crt
key server.key  # This file should be kept secret
dh dh2048.pem

server 192.168.6.0 255.255.255.0

ifconfig-pool-persist ipp.txt


push "route 192.168.10.0 255.255.255.0 192.168.10.1"
push "route 192.168.5.0 255.255.255.0 192.168.5.10"

route 192.168.5.0 255.255.255.0
route 192.168.10.0 255.255.255.0
push "dhcp-option DNS 192.168.1.2"

client-to-client

duplicate-cn
keepalive 10 120
comp-lzo
max-clients 20

persist-key
persist-tun
status openvpn-status.log
verb 3
And this is the log from Win 7:

Code: Select all

Wed Mar 09 15:28:03 2011 OpenVPN 2.1.4 i686-pc-mingw32 [SSL] [LZO2] [PKCS11] built on Nov  8 2010
Wed Mar 09 15:28:03 2011 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Wed Mar 09 15:28:03 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed Mar 09 15:28:10 2011 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Wed Mar 09 15:28:10 2011 LZO compression initialized
Wed Mar 09 15:28:10 2011 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Wed Mar 09 15:28:10 2011 Socket Buffers: R=[8192->8192] S=[32767->32767]
Wed Mar 09 15:28:10 2011 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Mar 09 15:28:10 2011 Local Options hash (VER=V4): '41690919'
Wed Mar 09 15:28:10 2011 Expected Remote Options hash (VER=V4): '530fdded'
Wed Mar 09 15:28:10 2011 UDPv4 link local: [undef]
Wed Mar 09 15:28:10 2011 UDPv4 link remote: #.#.#.#:1194
Wed Mar 09 15:28:10 2011 TLS: Initial packet from #.#.#.#:1194, sid=f12f325b 7bcc7cc4
Wed Mar 09 15:28:10 2011 VERIFY OK: depth=1, /C=NL/ST=ZH/L=Barendrecht/O=Outdoor_XL/OU=Dragonwall/CN=dragonwall.oxl.local/name=Jonathan_Burgerhout/emailAddress=info@outdoorxl.nl
Wed Mar 09 15:28:10 2011 VERIFY OK: depth=0, /C=NL/ST=Zuid-Holland/L=Barendrecht/O=Outdoor_XL/OU=Dragonwall/CN=dragonwall.oxl.local/name=Jonathan_Burgerhout/emailAddress=info@outdoorxl.nl
Wed Mar 09 15:28:10 2011 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Mar 09 15:28:10 2011 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Mar 09 15:28:10 2011 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Mar 09 15:28:10 2011 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Mar 09 15:28:10 2011 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Wed Mar 09 15:28:10 2011 [dragonwall.oxl.local] Peer Connection Initiated with #.#.#.#:1194
Wed Mar 09 15:28:12 2011 SENT CONTROL [dragonwall.oxl.local]: 'PUSH_REQUEST' (status=1)
Wed Mar 09 15:28:12 2011 PUSH: Received control message: 'PUSH_REPLY,route 192.168.10.0 255.255.255.0 192.168.10.1,route 192.168.5.0 255.255.255.0 192.168.5.10,dhcp-option DNS 192.168.1.2,route 192.168.6.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 192.168.6.10 192.168.6.9'
Wed Mar 09 15:28:12 2011 OPTIONS IMPORT: timers and/or timeouts modified
Wed Mar 09 15:28:12 2011 OPTIONS IMPORT: --ifconfig/up options modified
Wed Mar 09 15:28:12 2011 OPTIONS IMPORT: route options modified
Wed Mar 09 15:28:12 2011 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Wed Mar 09 15:28:12 2011 ROUTE default_gateway=192.168.1.1
Wed Mar 09 15:28:12 2011 TAP-WIN32 device [Local Area Connection 4] opened: \\.\Global\{A3F2A844-01E3-42A5-8AC1-29AF19553905}.tap
Wed Mar 09 15:28:12 2011 TAP-Win32 Driver Version 9.7 
Wed Mar 09 15:28:12 2011 TAP-Win32 MTU=1500
Wed Mar 09 15:28:12 2011 Notified TAP-Win32 driver to set a DHCP IP/netmask of 192.168.6.10/255.255.255.252 on interface {A3F2A844-01E3-42A5-8AC1-29AF19553905} [DHCP-serv: 192.168.6.9, lease-time: 31536000]
Wed Mar 09 15:28:12 2011 Successful ARP Flush on interface [29] {A3F2A844-01E3-42A5-8AC1-29AF19553905}
Wed Mar 09 15:28:18 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:18 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:22 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:22 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:23 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:23 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:24 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:24 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:26 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:26 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:27 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:27 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:28 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:28 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:29 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:29 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:30 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:30 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:32 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:32 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:33 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:33 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:34 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:34 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:35 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:35 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:36 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:36 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:37 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:37 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:38 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:38 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:39 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:39 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:40 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:40 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:41 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:41 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:42 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:42 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:43 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:43 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:44 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:44 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:45 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:45 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:46 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:46 2011 Route: Waiting for TUN/TAP interface to come up...
Wed Mar 09 15:28:47 2011 TEST ROUTES: 1/3 succeeded len=3 ret=0 a=0 u/d=up
Wed Mar 09 15:28:47 2011 C:\WINDOWS\system32\route.exe ADD 192.168.10.0 MASK 255.255.255.0 192.168.10.1
Wed Mar 09 15:28:47 2011 Warning: route gateway is not reachable on any active network adapters: 192.168.10.1
Wed Mar 09 15:28:47 2011 Route addition via IPAPI failed [adaptive]
Wed Mar 09 15:28:47 2011 Route addition fallback to route.exe
 OK!
Wed Mar 09 15:28:47 2011 C:\WINDOWS\system32\route.exe ADD 192.168.5.0 MASK 255.255.255.0 192.168.5.10
Wed Mar 09 15:28:47 2011 Warning: route gateway is not reachable on any active network adapters: 192.168.5.10
Wed Mar 09 15:28:47 2011 Route addition via IPAPI failed [adaptive]
Wed Mar 09 15:28:47 2011 Route addition fallback to route.exe
 OK!
Wed Mar 09 15:28:47 2011 C:\WINDOWS\system32\route.exe ADD 192.168.6.0 MASK 255.255.255.0 192.168.6.9
Wed Mar 09 15:28:47 2011 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=30 and dwForwardType=4
Wed Mar 09 15:28:47 2011 Route addition via IPAPI succeeded [adaptive]
SYSTEM ROUTING TABLE
0.0.0.0 0.0.0.0 192.168.1.1 p=0 i=11 t=4 pr=3 a=17499 h=0 m=276/0/0/0/0
127.0.0.0 255.0.0.0 127.0.0.1 p=0 i=1 t=3 pr=3 a=610648 h=0 m=306/0/0/0/0
127.0.0.1 255.255.255.255 127.0.0.1 p=0 i=1 t=3 pr=3 a=610648 h=0 m=306/0/0/0/0
127.255.255.255 255.255.255.255 127.0.0.1 p=0 i=1 t=3 pr=3 a=610648 h=0 m=306/0/0/0/0
169.254.0.0 255.255.0.0 192.168.1.44 p=0 i=11 t=3 pr=3 a=32 h=0 m=296/0/0/0/0
169.254.255.255 255.255.255.255 192.168.1.44 p=0 i=11 t=3 pr=3 a=32 h=0 m=276/0/0/0/0
192.168.1.0 255.255.255.0 192.168.1.44 p=0 i=11 t=3 pr=3 a=17495 h=0 m=276/0/0/0/0
192.168.1.44 255.255.255.255 192.168.1.44 p=0 i=11 t=3 pr=3 a=17495 h=0 m=276/0/0/0/0
192.168.1.255 255.255.255.255 192.168.1.44 p=0 i=11 t=3 pr=3 a=17495 h=0 m=276/0/0/0/0
192.168.5.0 255.255.255.0 192.168.5.10 p=0 i=11 t=4 pr=3 a=0 h=0 m=21/0/0/0/0
192.168.6.0 255.255.255.0 192.168.6.9 p=0 i=29 t=4 pr=3 a=0 h=0 m=30/0/0/0/0
192.168.6.8 255.255.255.252 192.168.6.10 p=0 i=29 t=3 pr=3 a=34 h=0 m=286/0/0/0/0
192.168.6.10 255.255.255.255 192.168.6.10 p=0 i=29 t=3 pr=3 a=34 h=0 m=286/0/0/0/0
192.168.6.11 255.255.255.255 192.168.6.10 p=0 i=29 t=3 pr=3 a=34 h=0 m=286/0/0/0/0
192.168.10.0 255.255.255.0 192.168.10.1 p=0 i=11 t=4 pr=3 a=0 h=0 m=21/0/0/0/0
224.0.0.0 240.0.0.0 127.0.0.1 p=0 i=1 t=3 pr=3 a=610648 h=0 m=306/0/0/0/0
224.0.0.0 240.0.0.0 192.168.1.44 p=0 i=11 t=3 pr=3 a=21413 h=0 m=276/0/0/0/0
224.0.0.0 240.0.0.0 192.168.6.10 p=0 i=29 t=3 pr=3 a=10874 h=0 m=286/0/0/0/0
255.255.255.255 255.255.255.255 127.0.0.1 p=0 i=1 t=3 pr=3 a=610648 h=0 m=306/0/0/0/0
255.255.255.255 255.255.255.255 192.168.1.44 p=0 i=11 t=3 pr=3 a=21413 h=0 m=276/0/0/0/0
255.255.255.255 255.255.255.255 192.168.6.10 p=0 i=29 t=3 pr=3 a=10874 h=0 m=286/0/0/0/0
SYSTEM ADAPTER LIST
TAP-Win32 Adapter V9
  Index = 29
  GUID = {A3F2A844-01E3-42A5-8AC1-29AF19553905}
  IP = 192.168.6.10/255.255.255.252 
  MAC = 00:ff:a3:f2:a8:44
  GATEWAY = 0.0.0.0/255.255.255.255 
  DHCP SERV = 192.168.6.9/255.255.255.255 
  DHCP LEASE OBTAINED = Wed Mar 09 15:28:13 2011
  DHCP LEASE EXPIRES  = Thu Mar 08 15:28:13 2012
  DNS SERV = 192.168.1.2/255.255.255.255 
Realtek RTL8102E/RTL8103E Family PCI-E Fast Ethernet NIC (NDIS 6.20)
  Index = 11
  GUID = {74EAB376-FFA8-4084-8BB5-E4F8662B640E}
  IP = 192.168.1.44/255.255.255.0 
  MAC = d4:85:64:05:c5:e7
  GATEWAY = 192.168.1.1/255.255.255.255 
  DNS SERV = 192.168.1.1/255.255.255.255 
Wed Mar 09 15:28:47 2011 Initialization Sequence Completed With Errors ( see http://openvpn.net/faq.html#dhcpclientserv )
The
GATEWAY = 0.0.0.0/255.255.255.255
is the problem here isn't it? Do i need to push the gateway too? Like this?

Code: Select all

push "route-gateway 10.8.0.1"

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: OpenVPN on Debian doesn't want to route?

Post by janjust » Wed Mar 09, 2011 2:34 pm

change
push "route 192.168.10.0 255.255.255.0 192.168.10.1"
push "route 192.168.5.0 255.255.255.0 192.168.5.10"

route 192.168.5.0 255.255.255.0
route 192.168.10.0 255.255.255.0
to

Code: Select all

push "route 192.168.10.0 255.255.255.0"
push "route 192.168.5.0 255.255.255.0"

#route 192.168.5.0 255.255.255.0
#route 192.168.10.0 255.255.255.0
and try again.

jonathanb
OpenVpn Newbie
Posts: 8
Joined: Wed Mar 09, 2011 8:38 am

Re: OpenVPN on Debian doesn't want to route?

Post by jonathanb » Wed Mar 09, 2011 2:45 pm

THANK YOU!

That was it! I thought that I needed to add the

Code: Select all

push redirect-gateway 192.168.6.1
but even that wasn't needed.

Thank you for your patience with this Linux newbie.

Post Reply