LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Two daemons running on the same port (https://www.linuxquestions.org/questions/linux-networking-3/two-daemons-running-on-the-same-port-352682/)

Quantum0726 08-12-2005 05:36 PM

Two daemons running on the same port
 
Hi,
I have apache running with ssl on port 443. I also need to run ssh on port 443 (so I can connect to it through a https proxy--the only way of sending and receiving traffic at my work). I've found I can only run one at the same time. When I try starting apache I get the following error:

(98)Address already in use: make_sock: could not bind address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs

I guess this is to be expected, but I'm hoping that someone knows a way to get around this, i.e. open two sockets, or even some iptables forwarding trick. Any ideas?

Thanks much!

Matir 08-12-2005 05:37 PM

Nope. Only one application can be in use on one port/IP pair. Otherwise, who would know what you're talking about? :)

carl.waldbieser 08-12-2005 08:38 PM

Yeah, it would be like you and I both had the same street address, and someone tried to send me a postcard. Who would get it?

Quantum0726 08-15-2005 08:56 PM

Oh, well, I guess I'll have to choose to either run the ssh server or the https page for my website. Since the proxy only accepts traffic from port 443, I can't use another port. If I change the port with a link on my page, I get an error from the proxy saying that it only accepts 443. If I try to proxy-tunnel to port 22 for ssh I get the same message in the console. If anyone has any ideas around this let me know, otherwise I'll just have to ssh tunnel the new web page port to test it while I'm behind that proxy.

Thanks for the info though!

P.S. about the postcard metaphor, I was thinking that I could configure iptables to sort the traffic by header type, like having the same address but different names on the postcard. Same IP, same port, but different packet "type" and have iptables forward it to another port that ssh or apache could listen on. However, I have a feeling that this would be needlessly complex and possibly beyond iptables capabilities.

Matir 08-15-2005 10:39 PM

It only accepts connections for a destination 443 port? You could run the SSH server on 443, and tunnel your https connections through it to another port on your server. :)


All times are GMT -5. The time now is 09:14 PM.