Putty: remote server from outer

0

In my company's LAN, we use Putty to remote our server(Linux). This worked very well.

Now we have some outer employees, who need to remote the server from outer such as their homes etc.

For now, I do three things:

  1. Install Putty for their PCs.
  2. Open the port 22 of the server. To make sure that the port 22 is open, I type:

netstat -ano | grep 22 in my server and I get these messages:

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
  off (0.00/0/0)
tcp        0     64 192.168.178.18:22       192.168.178.63:10093    ESTABLISHED
  on (0.25/0/0)
tcp6       0      0 :::22                   :::*                    LISTEN
  off (0.00/0/0)

As you see, there are three messages, the second one comes from my pc in the company, in other words, it proves that the Putty in LAN works.

  1. Port Forwarding. I enter into the router of the company and make a port forwarding: MyServer TCP 22(From) Servername 22(To)

Now I call my colleague to let them try at home but they can't remote into the server. They always get this error: Timeout.

Someone can help me?

enter image description here

Yves

Posted 2015-04-02T12:58:36.813

Reputation: 223

It should work, I do this to my home network and it is fine. I suspect that you have a mistake in the router config. By the way, you might want to make the external port something other than 22. Otherwise you will find the port being bombarded by automated hacking attempts. – Julian Knight – 2015-04-02T13:01:39.850

By the way, the ip address of the server is dynamic, but as we d never shut down the server and the router, I m sure that the ip of the server never changes. – Yves – 2015-04-02T13:02:04.000

@JulianKnight maybe u r right. I dont know how to configure the router. I just do like this: Protocol: TCP From Port 22 though port 22 to port 22 to IP address 192.168.178.10(this is my server ip in LAN). I m not sure that these ports are set correctly. – Yves – 2015-04-02T13:08:46.437

Maybe if you can post a screenshot of the config page and let us know what model of router? These things vary by router. You could and probably should pin the internal address of the server. If the router is also doing DHCP, this is easy to do (again depends on router model). Problem at the moment is that if the address does change, you will have to redo your NAT rule. – Julian Knight – 2015-04-02T13:12:01.397

@JulianKnight sorry i have no enough reputation to post an image. My router is fritz box 7490 – Yves – 2015-04-02T13:42:02.053

@JulianKnight However, u can see this: https://www.youtube.com/watch?v=g99z1WE45oU

– Yves – 2015-04-02T13:43:15.430

Just paste a link to one of the free image host services. Someone with enough rep. will convert for you. – Julian Knight – 2015-04-02T13:51:57.677

@JulianKnight http://i.imgur.com/HrNbQHU.png

– Yves – 2015-04-02T14:25:21.927

@JulianKnight u see, there are three ports: from port, though port and to port. maybe I made some mistake. – Yves – 2015-04-02T14:26:36.967

@JulianKnight http://i.imgur.com/gJZ8ptH.png

– Yves – 2015-04-02T14:28:12.187

Seems OK, have you tried the IP address in the TO server part? – Julian Knight – 2015-04-02T15:09:33.010

@JulianKnight sorry i dont understand you. – Yves – 2015-04-02T15:25:28.283

Assuming the server is on 192.168.178.18 then use that in the TO part instead of ezsetupsystem0c8..... – Julian Knight – 2015-04-02T15:27:30.027

@JulianKnight OK this is not the problem. Because I edit it and there is a "TO IP address", ezsetupsys...this is just a name. – Yves – 2015-04-02T15:37:06.697

OK, worth a try – Julian Knight – 2015-04-02T15:37:40.047

@JulianKnight I think maybe I didnt configure the firewall of the server correctly. – Yves – 2015-04-02T15:37:42.060

Answers

0

Without knowing details of the LAN on your end, it sounds like you have multiple firewalls.

Your mention configuring the "Fritz Box 7490" to allow port 22. If the outside isn't reaching the destination internal in the LAN, then check the following:

  • assuming NAT IP addresses within the LAN, you need to configure the FritzBox to port forward incoming 22 appropriately to "remote the server"
  • ensure any firewall which exists outside of FritzBox allows incoming 22 and also appropriately port forwards if needed.
  • ensure no local firewall/iptables is blocking connection on the server itself.

Your problem is one of the above, or all three. Diagnose in stages. First have your remote client connect to the FritzBox - probably via http on port 80, then move inside the network.

Daniel

Posted 2015-04-02T12:58:36.813

Reputation: 932