Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an ubuntu machine on which I am running an openvpn server. From a windows machine on a different network when I try to connect to the ubuntu machine it says connected. I can even ping the local ip of the ubuntu machine. But I do not get a public ip address. That is the public ip address of the computer(windows) remains the same and does not change(checked on cmyip). Why is this happening and how should I resolve this issue?

Client config:

    client

    proto udp

    dev tun

    ca ca.crt

    dh dh2048.pem

    cert client3.crt

    key client3.key

    remote publicip 1194

    cipher DES-CBC

    verb 2

    mute 20

    keepalive 10 120

    comp-lzo

    persist-key

    persist-tun

    float

    resolv-retry infinite

    nobind

Server config:

port 1194
proto udp
dev tun0
ca keys/test/ca.crt
cert keys/test/check.crt
key keys/test/check.key
dh keys/test/dh2048.pem
server 10.180.240.0 255.255.240.0
crl-verify keys/test/crl.pem
cipher DES-CBC
user nobody
group nogroup
status servers/VPn1/logs/openvpn-status.log
log-append servers/VPn1/logs/openvpn.log
verb 2
mute 20
max-clients 100
local 192.168.1.101
keepalive 10 120
client-config-dir /etc/openvpn/servers/VPn1/ccd
client-to-client
duplicate-cn
comp-lzo
persist-key
persist-tun
ccd-exclusive
route 10.22.1.0 255.255.255.0
route 10.22.2.0 255.255.255.0
route 10.22.3.0 255.255.255.0
push "route 10.180.0.0 255.255.252.0"
push "route 10.22.1.0 255.255.255.0"
push "route 10.22.2.0 255.255.255.0"
push "route 10.22.3.0 255.255.255.0"
push "dhcp-option DNS 10.180.3.12"

ipconfig /all

Tunnel adapter 6TO4 Adapter:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft 6to4 Adapter
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #4
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #5
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
share|improve this question
1  
What are your config files from server and client (non-comment lines only)? –  ott-- Jan 22 '13 at 9:44
    
have made the changes now –  Sab Jan 22 '13 at 10:37
    
Can you show the output of ipconfig /all on windows stripped to the data for the TAP? –  ott-- Jan 22 '13 at 10:48
    
edited the question –  Sab Jan 22 '13 at 11:55
    
Mine looks different: TAP-Win32 Adapter V9 –  ott-- Jan 22 '13 at 12:07

2 Answers 2

If you want to use OpenVPN server as gateway, you need to push default route to your clients.

server config:

push "redirect-gateway def1"

http://openvpn.net/index.php/open-source/documentation/howto.html#redirect

share|improve this answer

Your expectation is incorrect. There is nothing to tell the machine to use the VPN as its gateway to the Internet, so no reason its public IP address, as seen from the Internet, should change.

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.