Question:
On the server, port 443 is already in use by a different service.
However I require STunnel to communicate also on port 443.
I thought, that perhaps I can obtain a second IP address and forward that trafic from the router to port 444 (or any other avail port). Then I can let Stunnel listen to port 444 and thus it would work. The firewall has to translate the 444 back to the 443 when transmitting data ofcourse.
Is this the right way to go? Or ca I do this using one and the same IP (but then there would be 2 services listning to the same port right)?
Thanks.
Reinier
Reinier van der Gugten wrote:
Is this the right way to go? Or ca I do this using one and the same IP (but then there would be 2 services listning to the same port right)?
Yes, you can have different services listening on the same port number but different network interfaces.
Most servers (including stunnel) allow to choose not only port number but also IP address.
With stunnel you need: accept = <your_secondary_ip>:443
Best regards, Michal Trojnara
On 2009-12-09 11:31, Michal Trojnara wrote:
Reinier van der Gugten wrote:
Is this the right way to go? Or ca I do this using one and the same IP (but then there would be 2 services listning to the same port right)?
Yes, you can have different services listening on the same port number but different network interfaces.
Most servers (including stunnel) allow to choose not only port number but also IP address.
With stunnel you need: accept = <your_secondary_ip>:443
Only make sure that when you reboot your box..
Your 1'st service only accepts connections on <ip1>:443 and that your 2'nd service only accepts connections on <ip2>:443
Otherwise when you reboot you might run into the situation where you start service #1 that that will accept connections on both IP's and that when you start service #2 <ip2>:443 already is occupied...
It unfortunately depends on application/OS how you avoid this..;-)
Regards/Uffe