This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How does SOCKS work exactly?

The most obvious way to use the SOCKS proxy is when a client behind the firewall wants to create an outgoing connection via the SOCKS proxy when the firewall rules are blocking outgoing connections.

But what about the other way? Can a client create a listening socket in the SOCKS proxy for incoming connections?


This thread was automatically locked due to age.
  • Hi,
    If an internal client creates a SOCKS connection, and keeps it open, then incoming traffic on the relevant ports should be routed to the client. 

    Does that answer your question?

    If your client doesn't support SOCKS, you should be using DNAT.

    Barry
  • Here is a description of how I see it. It is probably wrong.

    OUTBOUND CONNECTIONS (The Client wants to connect to external peers)
    The client creates a connection to the SOCKS-proxy together with information about the peer (port and IP-address) to whom the Client want to make a connection to. If success, a session is created between the Client and the remote peer via the SOCKS proxy. 

    If the client want to make more connection, the Client connects multiple times to the SOCKS proxy

    INBOUND CONNECTIONS
     (The Client wants to listening for incoming connections)
    The client creates a connection to the SOCKS-proxy together with a listening port number. If a remote peer connects to the SOCKS IP-adress, a session is created between the Client and the remote peer.
    If the Client wants to listen for more incoming connections, the Client creates multiple connections to the proxy.

    I have tried to read the RFC, but I do not get it.