# OpenVPN not giving new IP

## imieinazwisko

I'm trying to connect to my VPN service. Several ovpn files are provided which should make it relatively easy to connect. Installing OpenVPN per instructions and then executing the ovpn script everything looks good (I admittedly don't know networking very well) except that I am not picking up a new ip address. Checking using ifconfig as well as in a browser my ip address has remained the one provided by my ISP. Is there something else I need to run to pick up the new ip address? I have tried resetting my network as follows without any luck.

```
/etc/init.d/net.<dev> restart
```

Here is how I am executing openvpn and the resultant output. route also seems to be a common inclusion in networking problems so including that as well.

```
openvpn file.ovpn
```

Results in the following:

```
Wed Feb 26 22:28:14 2020 TCP/UDP: Preserving recently used remote address: [AF_INET]209.99.109.23:443

Wed Feb 26 22:28:14 2020 Socket Buffers: R=[212992->212992] S=[212992->212992]

Wed Feb 26 22:28:14 2020 UDP link local: (not bound)

Wed Feb 26 22:28:14 2020 UDP link remote: [AF_INET]209.99.109.23:443

Wed Feb 26 22:28:14 2020 TLS: Initial packet from [AF_INET]209.99.109.23:443, sid=81e27a04 2594e1eb

Wed Feb 26 22:28:14 2020 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this

Wed Feb 26 22:28:14 2020 VERIFY OK: depth=1, C=KY, ST=GrandCayman, L=GeorgeTown, O=GoldenFrog-Inc, CN=GoldenFrog-Inc CA, emailAddress=admin@goldenfrog.com

Wed Feb 26 22:28:14 2020 VERIFY X509NAME OK: C=KY, ST=GrandCayman, L=GeorgeTown, O=GoldenFrog-Inc, CN=pa1.vyprvpn.com, emailAddress=admin@goldenfrog.com

Wed Feb 26 22:28:14 2020 VERIFY OK: depth=0, C=KY, ST=GrandCayman, L=GeorgeTown, O=GoldenFrog-Inc, CN=pa1.vyprvpn.com, emailAddress=admin@goldenfrog.com

Wed Feb 26 22:28:15 2020 Control Channel: TLSv1.2, cipher SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA

Wed Feb 26 22:28:15 2020 [pa1.vyprvpn.com] Peer Connection Initiated with [AF_INET]209.99.109.23:443

Wed Feb 26 22:28:16 2020 SENT CONTROL [pa1.vyprvpn.com]: 'PUSH_REQUEST' (status=1)

Wed Feb 26 22:28:16 2020 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 10.2.18.1,explicit-exit-notify 5,rcvbuf 524288,route-gateway 10.2.18.1,topology subnet,ping 10,ping-restart 60,ifconfig 10.2.18.177 255.255.255.0,peer-id 0,cipher AES-256-GCM'

Wed Feb 26 22:28:16 2020 OPTIONS IMPORT: timers and/or timeouts modified

Wed Feb 26 22:28:16 2020 OPTIONS IMPORT: explicit notify parm(s) modified

Wed Feb 26 22:28:16 2020 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified

Wed Feb 26 22:28:16 2020 Socket Buffers: R=[212992->425984] S=[212992->212992]

Wed Feb 26 22:28:16 2020 OPTIONS IMPORT: --ifconfig/up options modified

Wed Feb 26 22:28:16 2020 OPTIONS IMPORT: route options modified

Wed Feb 26 22:28:16 2020 OPTIONS IMPORT: route-related options modified

Wed Feb 26 22:28:16 2020 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified

Wed Feb 26 22:28:16 2020 OPTIONS IMPORT: peer-id set

Wed Feb 26 22:28:16 2020 OPTIONS IMPORT: adjusting link_mtu to 1625

Wed Feb 26 22:28:16 2020 OPTIONS IMPORT: data channel crypto options modified

Wed Feb 26 22:28:16 2020 Data Channel: using negotiated cipher 'AES-256-GCM'

Wed Feb 26 22:28:16 2020 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key

Wed Feb 26 22:28:16 2020 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key

Wed Feb 26 22:28:16 2020 ROUTE_GATEWAY 10.0.1.1/255.255.255.0 IFACE=enp3s0 HWADDR=40:8d:5c:2a:8b:73

Wed Feb 26 22:28:16 2020 TUN/TAP device tun0 opened

Wed Feb 26 22:28:16 2020 TUN/TAP TX queue length set to 100

Wed Feb 26 22:28:16 2020 /bin/ifconfig tun0 10.2.18.177 netmask 255.255.255.0 mtu 1500 broadcast 10.2.18.255

Wed Feb 26 22:28:16 2020 /bin/route add -net 209.99.109.23 netmask 255.255.255.255 gw 10.0.1.1

Wed Feb 26 22:28:16 2020 /bin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 10.2.18.1

Wed Feb 26 22:28:16 2020 /bin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 10.2.18.1

Wed Feb 26 22:28:16 2020 Initialization Sequence Completed
```

```
# route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

0.0.0.0         10.2.18.1       128.0.0.0       UG    0      0        0 tun0

default         10.0.1.1        0.0.0.0         UG    2      0        0 enp3s0

10.0.1.0        0.0.0.0         255.255.255.0   U     2      0        0 enp3s0

10.2.18.0       0.0.0.0         255.255.255.0   U     0      0        0 tun0

128.0.0.0       10.2.18.1       128.0.0.0       UG    0      0        0 tun0

pa1.vpn.giganew 10.0.1.1        255.255.255.255 UGH   0      0        0 enp3s0
```

----------

## z4

Doesn't look that bad...I think what you have is working.  In particular, look at:

```

Wed Feb 26 22:28:16 2020 ROUTE_GATEWAY 10.0.1.1/255.255.255.0 IFACE=enp3s0 HWADDR=40:8d:5c:2a:8b:73

Wed Feb 26 22:28:16 2020 TUN/TAP device tun0 opened

Wed Feb 26 22:28:16 2020 TUN/TAP TX queue length set to 100

Wed Feb 26 22:28:16 2020 /bin/ifconfig tun0 10.2.18.177 netmask 255.255.255.0 mtu 1500 broadcast 10.2.18.255

Wed Feb 26 22:28:16 2020 /bin/route add -net 209.99.109.23 netmask 255.255.255.255 gw 10.0.1.1

Wed Feb 26 22:28:16 2020 /bin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 10.2.18.1

Wed Feb 26 22:28:16 2020 /bin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 10.2.18.1

Wed Feb 26 22:28:16 2020 Initialization Sequence Completed

```

You didn't post the output of your 'ifconfig' command, but I'll bet there's a "tun0" device with IP address 10.2.18.17.  Routes looks good too.

Don't expect your ISP-provided network port to change.  VPN still needs a physical port to ride on.  Get the traceroute package, and run traceroute to some destination both before and after you have VPN running.  You should see a different route.

----------

