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:
- Install Putty for their PCs.
- 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.
- 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?
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.430Just 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.187Seems 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 ofezsetupsystem0c8.....
– 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