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

bind repeater to one ip

SC <-> Proxy <-> Repeater <-> Proxy <-> Viewer
Post Reply
Greta
20
20
Posts: 44
Joined: 2007-05-15 07:32

bind repeater to one ip

Post by Greta »

How can I change the source code so that the repeater is bind to one ip number.
Greta
20
20
Posts: 44
Joined: 2007-05-15 07:32

Re: bind repeater to one ip

Post by Greta »

Is there no one who knows how to bind the repeater to one ip number if the server has several addresses.

I have already searched the internet for this but could find any thing about it
User avatar
JDaus
Friend of UVNC
Friend of UVNC
Posts: 537
Joined: 2007-03-17 11:00
Location: Sydney, Australia
Contact:

Re: bind repeater to one ip

Post by JDaus »

if you are running WINXP, you should be able to setup the firewall rule with a limited scope ... its NOT binding it to an IP, but it will do what you want it to do ...

What OS are you running (i presume windows ...)
ask a silly question and remain a fool for 5 minutes...
don't ask, and remain a fool for life - JDaus 2003

without imperfections, neither you nor i would exist - Steven Hawkins
__
JD
SCPrompt - OpenSource Free Remote Screen\Desktop Sharing Solution
SecureTech.com.au
Greta
20
20
Posts: 44
Joined: 2007-05-15 07:32

Re: bind repeater to one ip

Post by Greta »

It runs on a Windows 2003 server with 16 IP numbers. And the repeater is listening on all ip numbers. So if one ip number use already port 443 then the repeater won’t run any more.
User avatar
JDaus
Friend of UVNC
Friend of UVNC
Posts: 537
Joined: 2007-03-17 11:00
Location: Sydney, Australia
Contact:

Re: bind repeater to one ip

Post by JDaus »

ah ... then thats a little different ...

i understand now why you wish to tie it to one IP ...


I have a question (for my own knowledge, not too question you) ... under windows, if a port is in use on a machine (on one or several IPs) can you then use that same port on other IPs ???

i know this can be done in the UNIX / LINUX world, but i thought that windows just reserved the port
ask a silly question and remain a fool for 5 minutes...
don't ask, and remain a fool for life - JDaus 2003

without imperfections, neither you nor i would exist - Steven Hawkins
__
JD
SCPrompt - OpenSource Free Remote Screen\Desktop Sharing Solution
SecureTech.com.au
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: bind repeater to one ip

Post by Rudi De Vos »

addr.sin_addr.s_addr = htonl(INADDR_ANY);
bind(sock, (struct sockaddr *)&addr, sizeof(addr))

replace INADDR_ANY by the ip of the NIC you want to bind to
This should work if the cards have been setup proper, if ip's on the
cards doesn't overlap.

FAULT SETUP
192.168.1.1 255.255.255.0 -> This card is responsible for direct connections to 192.168.1.X
192.168.1.2 255.255.255.0 ->This card is responsible for direct connections to 192.168.1.X
Both cards serv the same ip range, and bind get confused, possible it will
bind on all cards that can server the ip adress you entered.
Greta
20
20
Posts: 44
Joined: 2007-05-15 07:32

Re: bind repeater to one ip

Post by Greta »

JDaus wrote:ah ... then thats a little different ...
I have a question (for my own knowledge, not too question you) ... under windows, if a port is in use on a machine (on one or several IPs) can you then use that same port on other IPs ???
Yes you can, if you bind the program to one ip then you can use on an other ip (on the same machine) the same port if you then also bind the program on that specific ip.
Rudi De Vos wrote:addr.sin_addr.s_addr = htonl(INADDR_ANY);
bind(sock, (struct sockaddr *)&addr, sizeof(addr))
replace INADDR_ANY by the ip of the NIC you want to bind to
Thanks, I try this.
Greta
20
20
Posts: 44
Joined: 2007-05-15 07:32

Re: bind repeater to one ip

Post by Greta »

The binding to the ip number works now. Only I can not connect on SSL anymore. VNC through the normal ports 5500/5901 works perfect. When you see the log it seem everything is alright.
SSL initialized
SSL loading CERTIFICATE.PEM
SSL listener started on port = 443

Anyone any idea?
Greta
20
20
Posts: 44
Joined: 2007-05-15 07:32

Re: bind repeater to one ip

Post by Greta »

I have already found it. I was forgotten to change strcpy(tcpCi[0].backEndServerIPAddr, "127.0.0.1");
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: bind repeater to one ip

Post by Rudi De Vos »

Great, can you provide the source so we can make it available to other.
This was requested a time ago, by less talented developpers :)
Greta
20
20
Posts: 44
Joined: 2007-05-15 07:32

Re: bind repeater to one ip

Post by Greta »

I have placed the ip number hard into the source code. So I don’t think it is usable for everybody. When you want a different ip number you have to rebuild the source.
labarks
Posts: 1
Joined: 2007-07-07 05:40
Contact:

Re: bind repeater to one ip

Post by labarks »

is this feature of setting the ip address or interface available with the ultravnc server yet?
Greta
20
20
Posts: 44
Joined: 2007-05-15 07:32

Re: bind repeater to one ip

Post by Greta »

No idea if that’s also possible whit ultravnc server.

If you want to do what I have done you have to look in the code for addr.sin_addr.s_addr and change INADDR_ANY to your ip number thant you want to use and recompile the code. The program then works only on them machine with that ip number.
Post Reply