PtokaX forum

Development Section => LUA & PtokaX-Scripting-Interface => Topic started by: Vix on 20 April, 2005, 19:52:39

Title: Run ptokax of certain IP
Post by: Vix on 20 April, 2005, 19:52:39
I have 2 IP addresses allocated to my server. However, i only want it to work on one IP address and not the other. Is there a way of limiting this?

Thanks in advance

Regards

Vikas
Title:
Post by: Dessamator on 20 April, 2005, 20:01:59
well its simple disable the second ip, :D
Title:
Post by: Vix on 20 April, 2005, 20:32:09
Want the second IP Accessible by another hub software.
Title:
Post by: PPK on 20 April, 2005, 23:32:03
QuoteOriginally posted by Vix
Is there a way of limiting this?
With available PtokaX version probably not, i try to fix this to next version :))
Title:
Post by: Vix on 20 April, 2005, 23:54:45
Does dc++ automatically connect to port 411?
Title:
Post by: Herodes on 21 April, 2005, 00:25:33
QuoteOriginally posted by Vix
Does dc++ automatically connect to port 411?
yes .. if no other port is specified by the connecting address sting.

some.dchub.org:411 // is the same as // some.dchub.org

for the clients..
Title:
Post by: Vix on 21 April, 2005, 19:30:07
So suppose i wanted to have //www.hub1.com connect to port 411 and //www.hub2.com connect to port 412;

Is there any way of doing this? I am using a windows 2000 server. Maybe windows can work out which domain is asking and send the user to the correct port?
Title:
Post by: Saivert on 22 April, 2005, 17:58:43
QuoteOriginally posted by Vix
So suppose i wanted to have //www.hub1.com connect to port 411 and //www.hub2.com connect to port 412;

Is there any way of doing this? ...

Nope! Not with standard DNS techniques. DNS lookups are only IP address based and the two domain names you listed can only resolve to an IP address only and not ports too.

You can use virtual host techniques where both domain names point at the same IP but then a special server software intercepts the connection looking up what host was used in the connection and then route the data to one of the hub daemons running on the same computer. The special server software would then have to connect to the hub running on 412 when the host //www.hub2.com was used and a hub running on 411 when //www.hub1.com was used. It would have to open a socket to the hub, passing data from it's own connection with the client through to the hub. This means that you get an extra load on the server becuase you are in fact running two connections per client connection. The client wouldn't see a difference though. And runnnig multiple hubs on the same computer requires an extremely powerful computer anyway (if the hubs got thousands of users each). And it requires the client to send a long which domain name it resolved when making the connection, and I don't think most clients today send this info (like web browsers do).

The internet uses the same technique when a GET request for //www.myserver.com/page.html will result in the HTTP server to respond with a file from c:\www\page1.html and a GET request for //www.myotherserver.com/page.html will return the c:\www\otherserver\page2.html assuming both domain names point to same computer/IP address.

You also got something called multi-homing but that means that a single computer got several NICs (Network Interface Card/Ethernet adapters) and a single HTTP daemon can bind to multiple IP addresses and handle all the connections internally for simplified management (vs. mulltiple HTTP daemons).

I think I have covered most things now, but as always I might be wrong.
Title:
Post by: Vix on 22 April, 2005, 18:41:12
Quite a lot to take in there. Thanks :)

Hubs are gonna be  600 users max.

Have you got any software names  i could install. The computer im doing this on will be running one shoutcast source with low usage so it should be able to handle it (p 2.4Ghz, 512mb ram).

Thanks again for the info :)