Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

allow connect ONLY from these IPs

Post Reply
afontes
Posts: 2
Joined: 2007-03-22 00:44

allow connect ONLY from these IPs

Post by afontes »

Because last weekend someone has invaded my computer via VNC (yes, he/she also changed the UltraVNC's admin password), I would like to request a "allow connect ONLY from these IPs", or using files like /etc/hosts.allow and /etc/hosts.deny in Linux/Unix.

i.e., 192.168.0.*, 10.0.0.1, 200.1.2.3

Thank you very much for your attention, and I'm looking forward to see this feature implemented as soon as possible.

[mod=494,1215204040]moved from feature request to general help[/mod]
Last edited by afontes on 2008-07-04 20:40, edited 2 times in total.
mattice06082
Former moderator
Former moderator
Posts: 607
Joined: 2006-11-30 00:41
Location: Connecticut, USA

Re: allow connect ONLY from these IPs

Post by mattice06082 »

Have you looked into the encryption plugins? I'm not saying that you're concern does not need to be addressed, but in the meantime you can use the plugins to secure your connection.
Stegosh
Posts: 1
Joined: 2007-04-08 00:12

Re: allow connect ONLY from these IPs

Post by Stegosh »

I strongly support this feature request, the reason is very simple...

It does not matter how strong encryption do you have, there is a small chance that it can be broken and even if not, that doesnt stop wannabe hackers to try and try and try and flood your connection with failed attemtps.

If there was a way to allow only certain ips or certain ranges will increase security a lot, by just not answering login attempts you make the login much more secure.

Lets say some script kiddie wants to have some fun, he open his favorite scanner and set to scan a wide range of ips but only on ports 5800 and 5900, he will fast find a lot of VNC users, encryption might prevent him to enter your computer but it wont prevent him to "try" for hours or days, specially having more than one computer doing so.

If a simple ip check was added to the login this could be prevented, when this guy scan an ip with such measure, VNC will check BEFORE answer if the ip is allowed, if its not, it will do not answer, further it will do nothing so the scanner will report an open port only, but nothing running behind, if its allowed then ask for user/pass like it does now.

Yes, encryption is good, but combined with this could make VNC much more secure and less likely to be flooded, like mine was, thats why im here, to see if what the first poster requested was possible :wink:

Make it possible please, there is no such thing as extra security, because no ammount can be ever enough if your beloved PC/Server is at risk :-D
afontes
Posts: 2
Joined: 2007-03-22 00:44

Re: allow connect ONLY from these IPs

Post by afontes »

Thanks for the post.
Hanzolo
8
8
Posts: 13
Joined: 2007-01-27 18:11

Re: allow connect ONLY from these IPs

Post by Hanzolo »

I searched for this feature few months ago, too. Unfortunately there ain't any GUI for this. But it's easily possible.

Check this registry String:

HKEY_LOCAL_MACHINE\SOFTWARE\ORL\WinVNC3

There's a REG_SZ entry with the name "AuthHosts" which should be documented in the WinVNC documentation. Afaik UltraVNC is a modified WinVNC so this entry works fluelessly with UltaVNC. It's use is very simple.

E.g.
If you only want to allow access from 192.168.0.10 the entry should be:
"-:+192.168.0.10"


See here for further information:
AuthHosts
The AuthHosts setting is, unlike the other settings, a REG_SZ string. It is used to specify a set of IP address templates which incoming connections must match in order to be accepted. By default, the template is empty and connections from all hosts are accepted. The template is of the form:
+[ip-address-template]
?[ip-address-template]
-[ip-address-template]
In the above, [ip-address-template] represents the leftmost bytes of the desired stringified IP-address. For example, +158.97 would match both 158.97.12.10 and 158.97.14.2. Multiple match terms may be specified, delimited by the ":" character. Terms appearing later in the template take precedence over earlier ones. e.g. -:+158.97: would filter out all incoming connections except those beginning with 158.97. Terms beginning with the "?" character are treated by default as indicating hosts from whom connections must be accepted at the server side via a dialog box. The QuerySetting option determines the precise behaviour of the three AuthHosts options. Local machine-specific setting.
Last edited by Hanzolo on 2007-04-11 20:11, edited 3 times in total.
maeuchler
8
8
Posts: 9
Joined: 2006-10-12 13:54

Re: allow connect ONLY from these IPs

Post by maeuchler »

I've done all like Hanzolo wrote but it doesn't work for me.
Any idea to make this run?
Last edited by maeuchler on 2007-07-12 21:47, edited 1 time in total.
Hanzolo
8
8
Posts: 13
Joined: 2007-01-27 18:11

Re: allow connect ONLY from these IPs

Post by Hanzolo »

This works for sure!

Post your AuthHosts entry please..

edit: wow I answer so fast I could be live support ^^
Last edited by Hanzolo on 2007-07-12 21:55, edited 1 time in total.
maeuchler
8
8
Posts: 9
Joined: 2006-10-12 13:54

Re: allow connect ONLY from these IPs

Post by maeuchler »

I tryed it with

"-:+10.0.1.2"
and without ""
-:+10.0.1.2

But I can connect with any other IP
Hanzolo
8
8
Posts: 13
Joined: 2007-01-27 18:11

Re: allow connect ONLY from these IPs

Post by Hanzolo »

You must NOT put the " in the field of course! But I'm glad you tried it without them, too.

Did you restart the VNC server?

Seeing your IP reminds me of VPN. Are you running a VPN?

When you are connected run the service helper and right click on the tray icon and select "list client". What IP does it show?
maeuchler
8
8
Posts: 9
Joined: 2006-10-12 13:54

Re: allow connect ONLY from these IPs

Post by maeuchler »

So now i tryed just for fun with the IP "123.456.789.101"
But i can connect with the IP "10.0.1.2"

And that's (10.0.1.2) what I can see when I click on "list all clients"
And sure i restart the server.

P.S.: Yes, I run a VPN
Last edited by maeuchler on 2007-07-14 16:32, edited 2 times in total.
Hanzolo
8
8
Posts: 13
Joined: 2007-01-27 18:11

Re: allow connect ONLY from these IPs

Post by Hanzolo »

try a "-" and test if you cant connect anymore
if you can, then the whole auth hosts is not working and we'll see further.

please double-check also if its a REG_SZ string anf it its in the correct subfolder in the registry
maeuchler
8
8
Posts: 9
Joined: 2006-10-12 13:54

Re: allow connect ONLY from these IPs

Post by maeuchler »

OK i've tested it with just a "-" (without "") but I can connect.

I've checked the key HKEY_LOCAL_MACHINE\SOFTWARE\ORL\WinVNC3
there is a REG_SZ named AuthHosts
Hanzolo
8
8
Posts: 13
Joined: 2007-01-27 18:11

Re: allow connect ONLY from these IPs

Post by Hanzolo »

try to connect directly without VPN and test if it works. If then it's a problem with the VPN.

also try to put in the external IP (not the internal VPN ip) while VPN is running
maeuchler
8
8
Posts: 9
Joined: 2006-10-12 13:54

Re: allow connect ONLY from these IPs

Post by maeuchler »

VPN is closed but it's like before.
Hanzolo
8
8
Posts: 13
Joined: 2007-01-27 18:11

Re: allow connect ONLY from these IPs

Post by Hanzolo »

did you restart the VPN service over services.msc?
Also try to reboot the PC...
maeuchler
8
8
Posts: 9
Joined: 2006-10-12 13:54

Re: allow connect ONLY from these IPs

Post by maeuchler »

The VPN is closed.
I've rebooted my pc and nothing new.

Do you have ICQ or any other messenger?

[edit]
The problem is solved!
Hanzolo is a good boy, he's my hero :D
[/edit]
Last edited by maeuchler on 2007-07-14 19:27, edited 1 time in total.
n2bad
Posts: 3
Joined: 2008-01-16 03:09
Location: Canada
Contact:

Re: allow connect ONLY from these IPs

Post by n2bad »

I'm interested in that to, so what is the solution?

Thanks
2b || !2b does it mean to be or to look like?
Hanzolo
8
8
Posts: 13
Joined: 2007-01-27 18:11

Re: allow connect ONLY from these IPs

Post by Hanzolo »

The solution to his problem was rather special so I suggest you read the whole topic if you haven't done already.

Greetings
venkeey
Posts: 1
Joined: 2009-12-15 15:53

Re: allow connect ONLY from these IPs

Post by venkeey »

I also dad trouble restricting IPs to VNC.

Turns out my UseRegistry setting in UltraVNC.ini was set to 0. Changing it to 1 fixed my AuthHosts issue.
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: allow connect ONLY from these IPs

Post by Rudi De Vos »

you also van add the same settings to the ultravnc.ini file
Post Reply