[Solved] Connects enrypted but ISP can still read traffic

Samples of working configurations.

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

Locked
FUjZxe
OpenVpn Newbie
Posts: 2
Joined: Fri Aug 31, 2018 3:48 pm

[Solved] Connects enrypted but ISP can still read traffic

Post by FUjZxe » Fri Aug 31, 2018 4:24 pm

Hey,

I configured my own VPN Server and can sucessfully connect to it:
Image
Client LOG:

Code: Select all

Fri Aug 31 17:30:44 2018 NOTE: --user option is not implemented on Windows
Fri Aug 31 17:30:44 2018 NOTE: --group option is not implemented on Windows
Fri Aug 31 17:30:44 2018 OpenVPN 2.4.6 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Apr 26 2018
Fri Aug 31 17:30:44 2018 Windows version 6.2 (Windows 8 or greater) 64bit
Fri Aug 31 17:30:44 2018 library versions: OpenSSL 1.1.0h  27 Mar 2018, LZO 2.10
Fri Aug 31 17:30:44 2018 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
Fri Aug 31 17:30:44 2018 Need hold release from management interface, waiting...
Fri Aug 31 17:30:44 2018 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
Fri Aug 31 17:30:44 2018 MANAGEMENT: CMD 'state on'
Fri Aug 31 17:30:44 2018 MANAGEMENT: CMD 'log all on'
Fri Aug 31 17:30:44 2018 MANAGEMENT: CMD 'echo all on'
Fri Aug 31 17:30:44 2018 MANAGEMENT: CMD 'bytecount 5'
Fri Aug 31 17:30:44 2018 MANAGEMENT: CMD 'hold off'
Fri Aug 31 17:30:44 2018 MANAGEMENT: CMD 'hold release'
Fri Aug 31 17:30:44 2018 Outgoing Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Fri Aug 31 17:30:44 2018 Incoming Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Fri Aug 31 17:30:44 2018 TCP/UDP: Preserving recently used remote address: [AF_INET]35.185.54.105:1194
Fri Aug 31 17:30:44 2018 Socket Buffers: R=[65536->65536] S=[65536->65536]
Fri Aug 31 17:30:44 2018 UDP link local: (not bound)
Fri Aug 31 17:30:44 2018 UDP link remote: [AF_INET]35.185.54.105:1194
Fri Aug 31 17:30:44 2018 MANAGEMENT: >STATE:1535729444,WAIT,,,,,,
Fri Aug 31 17:30:44 2018 MANAGEMENT: >STATE:1535729444,AUTH,,,,,,
Fri Aug 31 17:30:44 2018 TLS: Initial packet from [AF_INET]35.185.54.105:1194, sid=67916b4c e101bc5c
Fri Aug 31 17:30:45 2018 VERIFY OK: depth=1, C=US, ST=CA, L=Berkeley, O=TheImperium, OU=StormTroopers, CN=TheImperium CA, name=gh1server, emailAddress=nomail@here.com
Fri Aug 31 17:30:45 2018 VERIFY KU OK
Fri Aug 31 17:30:45 2018 Validating certificate extended key usage
Fri Aug 31 17:30:45 2018 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Fri Aug 31 17:30:45 2018 VERIFY EKU OK
Fri Aug 31 17:30:45 2018 VERIFY OK: depth=0, C=US, ST=CA, L=Berkeley, O=TheImperium, OU=StormTroopers, CN=server, name=gh1server, emailAddress=nomail@here.com
Fri Aug 31 17:30:45 2018 Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Fri Aug 31 17:30:45 2018 [server] Peer Connection Initiated with [AF_INET]35.185.54.105:1194
Fri Aug 31 17:30:46 2018 MANAGEMENT: >STATE:1535729446,GET_CONFIG,,,,,,
Fri Aug 31 17:30:46 2018 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Fri Aug 31 17:30:46 2018 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.10 10.8.0.9,peer-id 1,cipher AES-256-GCM'
Fri Aug 31 17:30:46 2018 OPTIONS IMPORT: timers and/or timeouts modified
Fri Aug 31 17:30:46 2018 OPTIONS IMPORT: --ifconfig/up options modified
Fri Aug 31 17:30:46 2018 OPTIONS IMPORT: route options modified
Fri Aug 31 17:30:46 2018 OPTIONS IMPORT: peer-id set
Fri Aug 31 17:30:46 2018 OPTIONS IMPORT: adjusting link_mtu to 1624
Fri Aug 31 17:30:46 2018 OPTIONS IMPORT: data channel crypto options modified
Fri Aug 31 17:30:46 2018 Data Channel: using negotiated cipher 'AES-256-GCM'
Fri Aug 31 17:30:46 2018 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Fri Aug 31 17:30:46 2018 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Fri Aug 31 17:30:46 2018 interactive service msg_channel=628
Fri Aug 31 17:30:46 2018 ROUTE_GATEWAY 192.168.8.1/255.255.255.0 I=21 HWADDR=00:1f:1f:46:83:22
Fri Aug 31 17:30:46 2018 open_tun
Fri Aug 31 17:30:46 2018 TAP-WIN32 device [Ethernet 5] opened: \\.\Global\{AB0CE83A-E33C-4EF2-9A71-4F85B5597C56}.tap
Fri Aug 31 17:30:46 2018 TAP-Windows Driver Version 9.21 
Fri Aug 31 17:30:46 2018 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.10/255.255.255.252 on interface {AB0CE83A-E33C-4EF2-9A71-4F85B5597C56} [DHCP-serv: 10.8.0.9, lease-time: 31536000]
Fri Aug 31 17:30:46 2018 Successful ARP Flush on interface [17] {AB0CE83A-E33C-4EF2-9A71-4F85B5597C56}
Fri Aug 31 17:30:46 2018 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Fri Aug 31 17:30:46 2018 MANAGEMENT: >STATE:1535729446,ASSIGN_IP,,10.8.0.10,,,,
Fri Aug 31 17:30:51 2018 TEST ROUTES: 2/2 succeeded len=1 ret=1 a=0 u/d=up
Fri Aug 31 17:30:51 2018 C:\WINDOWS\system32\route.exe ADD 35.185.54.105 MASK 255.255.255.255 192.168.8.1
Fri Aug 31 17:30:51 2018 Route addition via service succeeded
Fri Aug 31 17:30:51 2018 C:\WINDOWS\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 10.8.0.9
Fri Aug 31 17:30:51 2018 Route addition via service succeeded
Fri Aug 31 17:30:51 2018 C:\WINDOWS\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 10.8.0.9
Fri Aug 31 17:30:51 2018 Route addition via service succeeded
Fri Aug 31 17:30:51 2018 MANAGEMENT: >STATE:1535729451,ADD_ROUTES,,,,,,
Fri Aug 31 17:30:51 2018 C:\WINDOWS\system32\route.exe ADD 10.8.0.1 MASK 255.255.255.255 10.8.0.9
Fri Aug 31 17:30:51 2018 Route addition via service succeeded
Fri Aug 31 17:30:51 2018 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Fri Aug 31 17:30:51 2018 Initialization Sequence Completed
Fri Aug 31 17:30:51 2018 MANAGEMENT: >STATE:1535729451,CONNECTED,SUCCESS,10.8.0.10,35.185.54.105,1194,,
Fri Aug 31 17:32:38 2018 AEAD Decrypt error: bad packet ID (may be a replay): [ #6427 ] -- see the man page entry for --no-replay and --replay-window for more info or silence this warning with --mute-replay-warnings
Fri Aug 31 17:32:38 2018 AEAD Decrypt error: bad packet ID (may be a replay): [ #6428 ] -- see the man page entry for --no-replay and --replay-window for more info or silence this warning with --mute-replay-warnings
Server log:

Code: Select all

Fri Aug 31 15:30:43 2018 109.40.2.25:3011 TLS: Initial packet from [AF_INET]109.40.2.25:3011, sid=3ddf0f93 b4069bab
Fri Aug 31 15:30:43 2018 109.40.2.25:3011 VERIFY OK: depth=1, C=US, ST=CA, L=Berkeley, O=TheImperium, OU=StormTroopers, CN=TheImperium CA, name=gh1server, emailAddress=nomail@here.com
Fri Aug 31 15:30:43 2018 109.40.2.25:3011 VERIFY OK: depth=0, C=US, ST=CA, L=Berkeley, O=TheImperium, OU=StormTroopers, CN=client2, name=gh1server, emailAddress=nomail@here.com
Fri Aug 31 15:30:43 2018 109.40.2.25:3011 peer info: IV_VER=2.4.6
Fri Aug 31 15:30:43 2018 109.40.2.25:3011 peer info: IV_PLAT=win
Fri Aug 31 15:30:43 2018 109.40.2.25:3011 peer info: IV_PROTO=2
Fri Aug 31 15:30:43 2018 109.40.2.25:3011 peer info: IV_NCP=2
Fri Aug 31 15:30:43 2018 109.40.2.25:3011 peer info: IV_LZ4=1
Fri Aug 31 15:30:43 2018 109.40.2.25:3011 peer info: IV_LZ4v2=1
Fri Aug 31 15:30:43 2018 109.40.2.25:3011 peer info: IV_LZO=1
Fri Aug 31 15:30:43 2018 109.40.2.25:3011 peer info: IV_COMP_STUB=1
Fri Aug 31 15:30:43 2018 109.40.2.25:3011 peer info: IV_COMP_STUBv2=1
Fri Aug 31 15:30:43 2018 109.40.2.25:3011 peer info: IV_TCPNL=1
Fri Aug 31 15:30:43 2018 109.40.2.25:3011 peer info: IV_GUI_VER=OpenVPN_GUI_11
Fri Aug 31 15:30:43 2018 109.40.2.25:3011 Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Fri Aug 31 15:30:43 2018 109.40.2.25:3011 [client2] Peer Connection Initiated with [AF_INET]109.40.2.25:3011
Fri Aug 31 15:30:43 2018 MULTI: new connection by client 'client2' will cause previous active sessions by this client to be dropped.  Remember to use the --duplicate-cn option if you want multiple clients using the same certificate or username to concurrently connect.
Fri Aug 31 15:30:43 2018 MULTI_sva: pool returned IPv4=10.8.0.10, IPv6=(Not enabled)
Fri Aug 31 15:30:43 2018 MULTI: Learn: 10.8.0.10 -> client2/109.40.2.25:3011
Fri Aug 31 15:30:43 2018 MULTI: primary virtual IP for client2/109.40.2.25:3011: 10.8.0.10
Fri Aug 31 15:30:44 2018 client2/109.40.2.25:3011 PUSH: Received control message: 'PUSH_REQUEST'
Fri Aug 31 15:30:44 2018 client2/109.40.2.25:3011 SENT CONTROL [client2]: 'PUSH_REPLY,redirect-gateway def1,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.10 10.8.0.9,peer-id 1,cipher AES-256-GCM' (status=1)
Fri Aug 31 15:30:44 2018 client2/109.40.2.25:3011 Data Channel: using negotiated cipher 'AES-256-GCM'
Fri Aug 31 15:30:44 2018 client2/109.40.2.25:3011 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Fri Aug 31 15:30:44 2018 client2/109.40.2.25:3011 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Fri Aug 31 15:55:14 2018 client2/109.40.2.25:3011 [client2] Inactivity timeout (--ping-restart), restarting
Fri Aug 31 15:55:14 2018 client2/109.40.2.25:3011 SIGUSR1[soft,ping-restart] received, client-instance restarting
My ip is changed to another US-IP (I connect from Germany):
Image

But when I try to connect to a site (for reading scientific papers) which is blocked by my ISP (for copyright reasons) I see their webblock page instead of the desired page. That is surprising because I thought that my traffic is encrypted and cannot be read by my ISP. But it seems that I did not configure it properly but I do not know what to change. The log file says that the connection is encrypted and it seems that my IP also changed?!
Image

My server configuration is as following:
server
1
port 1194
2
proto udp
3
dev tun
4
ca ca.crt
5
cert server.crt
6
key server.key
7
dh dh2048.pem
8
server 10.8.0.0 255.255.255.0
9
ifconfig-pool-persist ipp.txt
10
push "redirect-gateway def1"
11
keepalive 10 120
12
tls-auth ta.key 0
13
key-direction 0
14
cipher AES-128-CBC
15
auth SHA256
16
user nobody
17
group nogroup
18
persist-key
19
persist-tun
20
status openvpn-status.log
21
log-append openvpn.log
22
verb 3



And my client configuration as following:

client
1
client
2
dev tun
3
proto udp
4
remote 35.185.54.105
5
resolv-retry infinite
6
nobind
7
user nobody
8
group nogroup
9
persist-key
10
persist-tun
11
remote-cert-tls server
12
tls-auth ta.key 1
13
cipher AES-128-CBC
14
auth SHA256
15
key-direction 1
16
verb 3
17
<ca>
18
--STRIPPED INLINE CA CERT--
19
</ca>
20
<cert>
21
--STRIPPED INLINE CERT--
22
</cert>
23
<key>
24
--STRIPPED INLINE KEY--
25
</key>
26
<tls-auth>
27
--STRIPPED INLINE TLS-AUTH KEY--

When my server boots up I use the command

Code: Select all

sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o ens4 -j MASQUERADE
to route the traffic through the VPN according to this how to: https://openvpn.net/index.php/open-sour ... l#redirect

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Connects enrypted but ISP can still read traffic

Post by TinCanTech » Fri Aug 31, 2018 4:42 pm

Your traffic is encrypted and your gateway is redirected ..

But your DNS is still local .. push a global DNS like google's 8.8.8.8

FUjZxe
OpenVpn Newbie
Posts: 2
Joined: Fri Aug 31, 2018 3:48 pm

Re: Connects enrypted but ISP can still read traffic

Post by FUjZxe » Sat Sep 01, 2018 10:16 am

Thank you, this worked.

I uncommented these two lines in the server configuration:

# 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 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"

Locked