# who locks a port?

## jody

Hi

I need to connect to a server over the port 22222

When this didn't work, i tried telnet:

```
jody@raven ~/progs/QHG3/trunk/genes $ telnet bigboss 22222

Trying XXX.XXX.XXX.XXX...

telnet: Unable to connect to remote host: No route to host

```

on the other hand 

```
jody@raven ~/progs/QHG3/trunk/genes $ telnet bigboss 8000 

Trying XXX.XXX.XXX.XXX...

Connected to bigboss.

Escape character is '^]'.

```

As far as i can tell, i don't have any IPTables rules which block any ports:

```
jody@raven ~/progs/QHG3/trunk/genes $ sudo iptables -L       

Chain INPUT (policy ACCEPT)

target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)

target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)

target     prot opt source               destination         

```

In this case, i try to connect via vpn.

From a machine with no iptables installed, living on the same IP subnet  i can successfully connect over the port 22222.

So i guess either my issue is related to iptables, or vpn does not transmit my port 22222 requests, right?

Can anybody help me open the port 22222 for output (and input)  on my machine?

Thank You

----------

## eccerr0r

It would the iptables of the router or the VPN server, if they happen to be the same.  If you can't muck with the router then you'll have to find other ways to access the resource.

If company policy doesn't forbid and you have sshd enabled with port forwarding, you can use that to forward ports, like

ssh -L 22222:localhost:22222 bigboss 

then in another window 

telnet localhost 22222

and you'll be using bigboss's port 22222.

Not quite the same but may do what you need.

----------

## webbj

 *jody wrote:*   

> Hi
> 
> I need to connect to a server over the port 22222
> 
> When this didn't work, i tried telnet:
> ...

 

Can you check /etc/ssh/sshd_config and see if you have port 22222 there?

----------

## eccerr0r

That is true, if that the company's way of hiding ssh by putting it on port 22222, then obviously you can't use sshd to forward.  You probably are SOL and have to get someone else to muck with the remote router or find some other way to get on the network.

----------

