Я хочу открыть порт 8000 на моем сервере Ubuntu 10.04 TLS

1074
Vineetb

Я использую сервер для своих приложений, и один из моих клиентов попросил открыть порт 8000 для своего DVR. Он хочет сделать переадресацию портов на своем маршрутизаторе, чтобы он мог получить доступ к своей камере из внешней сети. Может кто-нибудь, пожалуйста, помогите, потому что я не могу найти подходящее решение для этого через Интернет. Заранее спасибо. Vineet. :)

0
Вы должны следовать инструкциям маршрутизатора из его руководства, чтобы включить переадресацию портов. На странице настроек маршрутизатора должна быть эта опция. Chirag Bhatia - chirag64 10 лет назад 0
С роутером проблем нет. Проблема в том, что когда я проверяю порт на веб-сайтах, он показывает, что порт не прослушивает. Кто-то посоветовал вам открыть этот порт с вашего сервера, и я не знаю, как открыть порт на сервере. Vineetb 10 лет назад 0
Это работа приложения. Вам нужна программа, работающая на сервере, который прослушивает этот порт. Какая программа должна прослушивать этот номер порта, зависит от того, что вы хотите сделать на этом порту. Chirag Bhatia - chirag64 10 лет назад 0

1 ответ на вопрос

0
ju.kreber

As Chirag64 already said in the commentary: You have to configure your router and cofiguration highly depends on the model.

To put things with port forwarding clear: Typically, an application that runs on a system and wants to act as a server sets up a listen on this client. It chooses an network interface on the machine it runs (or uses them all) and a specific port. (We talk only about tcp/udp here) You can find out about the applications currently listening on your machine with the command "netstat -l". Now if a client wants to connect to this server, it must know his ip and port and then send a connection request. If the server application is listening there, a connection will be established.

Now what's the problem with routers? It's not the router, it's the NAT function. In your LAN, all network participants typically have an ip like 192.168.x.y. This is a private address room. You can run any server there and connect to it without problems. But now there's the internet. Your router is the gate to it, it has typically only one unique internet ip on its outer interface. Now how do you connect to your local server from the outside? If a connection is incoming to the router on let's say port 80, to which pc in the inner network shall it be send? Now the port forwarding takes action: You tell the router to pass all packets from a specific port on his outer interface to a specific pc in the inner network on a specific port. You can now easily access your server from the outside.

I don't completely understand your question, but I hope this will give you enough information to understand and fix the problem.

So go to the router configuration and enable port forwarding, be sure to assign the correct extern and intern ports, be sure you try to connect to the extern one with your correct extern ip and have the application run on a computer with the correct ip and the correct port. If it does not work, try from LAN. If it works from there but not from the outside, have a look on your application's security settings. Some allow only access to certain ressources from the local network.

If this did not answer your question, please describe a bit more precisely what you intend to do.