3

(updated routes list/OpenVPN connection data to reflect the current situation)

This probably has been asked/answered before, but i'm really lost (and i can't comment on other/existing questions yet due to lack of points).

What i'm trying (and want) to achieve, is to let my remote (WAN) users connect to my VNC server, but via my (Open)VPN public/external IP address.

I know i have to add a routing entry to the routing table, but i really have no clue what to enter.

Below is some useful information about my network:

IPCONFIG

Windows IP Configuration


Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . : home
   IPv6 Address. . . . . . . . . . . : (assumebly public address)
   Temporary IPv6 Address. . . . . . : (assumebly public address)
   Link-local IPv6 Address . . . . . : fe80::71dd:e774:1c82:f1ba%12
   IPv4 Address. . . . . . . . . . . : 192.168.0.227
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.0.1

Ethernet adapter Ethernet 2:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::98a3:ea3d:644e:7bd4%10
   IPv4 Address. . . . . . . . . . . : 10.9.1.54
   Subnet Mask . . . . . . . . . . . : 255.255.255.252
   Default Gateway . . . . . . . . . : (empty)

(Open)VPN IP data

  • 10.9.1.53 (OpenVPN DHCP server/gateway)
  • 10.9.1.54 (my local OpenVPN IP address)

ROUTE PRINT

===========================================================================
Interface List
 12...60 a4 4c 3f 52 63 ......Intel(R) 82579V Gigabit Network Connection
 10...00 ff 3c 66 f8 06 ......TAP-Windows Adapter V9
  1...........................Software Loopback Interface 1
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.168.0.1    192.168.0.227     25
          0.0.0.0        128.0.0.0        10.9.1.53        10.9.1.54     35
         10.9.0.1  255.255.255.255        10.9.1.53        10.9.1.54     35
        10.9.1.52  255.255.255.252         On-link         10.9.1.54    291
        10.9.1.54  255.255.255.255         On-link         10.9.1.54    291
        10.9.1.55  255.255.255.255         On-link         10.9.1.54    291
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331
        128.0.0.0        128.0.0.0        10.9.1.53        10.9.1.54     35
  (public VPN IP)  255.255.255.255      192.168.0.1    192.168.0.227     25
      192.168.0.0    255.255.255.0         On-link     192.168.0.227    281
    192.168.0.227  255.255.255.255         On-link     192.168.0.227    281
    192.168.0.255  255.255.255.255         On-link     192.168.0.227    281
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331
        224.0.0.0        240.0.0.0         On-link         10.9.1.54    291
        224.0.0.0        240.0.0.0         On-link     192.168.0.227    281
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  255.255.255.255  255.255.255.255         On-link         10.9.1.54    291
  255.255.255.255  255.255.255.255         On-link     192.168.0.227    281
===========================================================================

OpenVPN log:

Fri May 12 04:14:30 2017 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.9.1.54/255.255.255.252 on interface {3C66F806-61B1-4EE3-9874-E1BB65CDFC75} [DHCP-serv: 10.9.1.53, lease-time: 31536000]
Fri May 12 04:14:30 2017 Successful ARP Flush on interface [10] {3C66F806-61B1-4EE3-9874-E1BB65CDFC75}
Fri May 12 04:14:30 2017 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Fri May 12 04:14:30 2017 MANAGEMENT: >STATE:1494555270,ASSIGN_IP,,10.9.1.54,,,,
Fri May 12 04:14:32 2017 TEST ROUTES: 2/2 succeeded len=1 ret=1 a=0 u/d=up
Fri May 12 04:14:32 2017 C:\Windows\system32\route.exe ADD (public VPN address) MASK 255.255.255.255 192.168.0.1
Fri May 12 04:14:32 2017 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=25 and dwForwardType=4
Fri May 12 04:14:32 2017 Route addition via IPAPI succeeded [adaptive]
Fri May 12 04:14:32 2017 C:\Windows\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 10.9.1.53
Fri May 12 04:14:32 2017 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=35 and dwForwardType=4
Fri May 12 04:14:32 2017 Route addition via IPAPI succeeded [adaptive]
Fri May 12 04:14:32 2017 C:\Windows\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 10.9.1.53
Fri May 12 04:14:32 2017 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=35 and dwForwardType=4
Fri May 12 04:14:32 2017 Route addition via IPAPI succeeded [adaptive]
Fri May 12 04:14:32 2017 MANAGEMENT: >STATE:1494555272,ADD_ROUTES,,,,,,
Fri May 12 04:14:32 2017 C:\Windows\system32\route.exe ADD 10.9.0.1 MASK 255.255.255.255 10.9.1.53
Fri May 12 04:14:32 2017 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=35 and dwForwardType=4
Fri May 12 04:14:32 2017 Route addition via IPAPI succeeded [adaptive]
Fri May 12 04:14:32 2017 Initialization Sequence Completed
Fri May 12 04:14:32 2017 MANAGEMENT: >STATE:1494555272,CONNECTED,SUCCESS,10.9.1.54,(public VPN address),443,192.168.0.227,3053

VPNbook.com OpenVPN 'client' config that i use

client
dev tun1
proto tcp
remote [obtained VPN IP address] 443
remote [obtained VPN hostname] 443
resolv-retry infinite
nobind
persist-key
persist-tun
auth-user-pass
comp-lzo
verb 3
cipher AES-128-CBC
fast-io
pull
route-delay 2
redirect-gateway

And finally some PING info:

Pinging 10.9.1.54 with 32 bytes of data:
Reply from 10.9.1.54: bytes=32 time<1ms TTL=128

Pinging [public VPN address] with 32 bytes of data:
Reply from xxx.xxx.xxx.xxx: bytes=32 time=53ms TTL=50

To recap: I want my clients to be able to VNC to my box using my public VPN IP address or its Dynamic DNS hostname that i have set-up.

Hopefully someone has the answer and a possible solution for me.

Best regards,

copyitright

15
  • 1
    You don't necessarily have to set up a special route. Please edit in your OpenVPN configuration. Can you ping the device on the virtual IP? If yes: you don't need a route and should be able to connect via VNC, if no: your config is wrong.
    – Lenniey
    May 11, 2017 at 6:38
  • Hmm, interesting. I'll have a look and respond back. The OpenVPN config hasn't been touched by me as i downloaded a ready2use config. Thanks for the feedback and i'll let you know if it worked. May 11, 2017 at 18:46
  • @Lenniey I could ping my public VPN address both locally and remotely. I could also ping my VPN's local address (locally of course). VNC'ing via my public VPN address however is impossible but seems more related to how my routes are set-up. I don't know what to change in my OpenVPN config. I've read all docs but it's way beyond my understanding. May 12, 2017 at 2:36
  • Where did you get this config from? It's not...usual. But: can you ping from your client to your local VPN-server IP?
    – Lenniey
    May 12, 2017 at 6:48
  • The config is from VPN service vpnbook.com. My VNC clients aren't on the same network. They are supposed to connect over WAN (internet). These clients can't ping my local VPN address. - BUT, since you've mentioned my VPN config to look 'unusual', i did some digging. I found out that the used VPN config appears to be an OpenVPN 'client' config. Though, i have no intentions acting as a VPN server myself. May 12, 2017 at 12:19

1 Answer 1

1

Great to see your working with Tight VNC.

I was running with Ultra VNC in my user's machine and connect them while I was working in the home.

I connect with Open VPN, I will just use VNC clients such as tight VNC viewer or Ultra VNC viewer.

I just put the IP of the user I want to connect as like I was in office.

I can access the office network.

So, there is no requirement for adding routing table.

Please refine your Tight VNC server in the machine, check the firewall ports that 5900 and 5901 is allowed.

If you find any other issue, or the same issue exists please don't hesitate to ask me back.

Thanks and regards,

Sathiya Moorthy K

3
  • I've removed my previous comment as i overlooked the third sentence about OpenVPN. All the necessary/required ports are allowed/not blocked. I have the slightest idea why it won't work for me. May 12, 2017 at 2:42
  • I strongly recommend you to go with Single Click of Ultra VNC.I just worked 8 months before and achieved the project by connecting my clients to my system globally.As the single click is open source, there will be no proper documentation for proceeding. May 17, 2017 at 10:47
  • Thanks. But what version should i download (all versions appear old/outdated to me)? Also the website states "Size: UltraVNC is about 650k while SC is only 166k", but after downloading and opening some archives, filesizes are over 1MB, instead of the advertised 166k. May 23, 2017 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.