• How and why to open computer ports? Opening ports on the router yourself

    The popular question “how to check if a port is open” is relevant for both experienced gamers and novice system administrators. Accordingly, before opening ports on a computer running Windows XP, 7 or 8, you need to decide on the ultimate goal of this “enterprise” and which ports need to be opened. For example, for Skype this is port 433 and 80, and for the mega-popular game Minecraft you will need to open port 25565.

    In itself, “opening ports” does not cause any damage to your computer: its security will depend on what program uses and “listens” on it and how.

    To further protect yourself, you can view statistics on the ports most vulnerable to viruses and hacking.

    For example, most companies providing services information security, they recommend paying attention to port numbers: 21, 23, 25, 80, 1026, 1028, 1243, 137, 139, 555, 666, 1001, 1025, 7000, 8080, 12345, 31337, 31338.

    In other words, open ports- like open doors to a harsh world high technology, accordingly, you should not open everything without knowing by whom and for what purpose this port can be used.

    How to find out which ports are open on a Windows 7 computer?

    Once the target has been determined and the list of ports has been “agreed”, it is necessary to check whether the port is currently open. To do this, you can use the Command Line:

    Open Command Prompt and enter the command “netstat -a”;

    In response to the command, Windows OS will present a list of all open “TCP” and “UPD” ports;

    The "Status" column will indicate what is happening with this port:

    • - “Listening” - that is, the port is “listening”. In other words, some program monitors the activities of a given port;
    • - “Established” - the port is open and in use;
    • - “Time wait” - the port is in standby mode: i.e. the program using it is preparing to put the port into one of the specified states.

    Currently, there are quite a lot of services that allow you to check whether ports are open or not: for example, it has earned the trust of users online check"2ip". To check, you just need to enter the port number and click “check”.

    So, having decided how to view open ports, now calmly open the desired port.

    How to open a port in windows 7 firewall?

    The easiest way to open the required port on your computer is to use the built-in Windows Firewall:

    - (“Start” - “Control Panel”);

    In the column on the left " Additional settings» The Windows Firewall in mode window will open. increased security»;

    • - click “Rule for incoming connection” and in the “Actions” section (right side of the window) select “Create rule”;

    • - the “Rule Creation Wizard” will open: from the list presented, select “For a port” and click “Next”;

    Below is the line “Specified local ports”: this is where you need to register the port to open (or range of ports) and click “Next”;

    • - the “Actions” section will open, in which select “Allow connection” - since you need to open a port on the computer;

    • after which you will only have to enter the name cos of this rule and - optionally - fill out a description.

    If the firewall is configured incorrectly, this may occur, which we discussed in one of the previous articles.

    This is the easiest way to open ports on windows computer 7. No secret knowledge or secrets of network magic are required for this action, it is only important to know which port needs to be opened and in which protocol it is used.

    How to open a port via Windows command line?

    However, the ability to open a port through a firewall is far from the only method that can be used. You can also open ports on your computer using the “Command Line”: it is not difficult, but this approach requires basic knowledge of the structure and functional part of the “netsh” command.

    So, open a command prompt with “Administrator rights” and enter the command “netsh advfirewall firewall add rule name=L2TP_TCP protocol=TCP localport=xxxx action=allow dir=IN”

    The command structure includes the following parameters:

    • - the name “L2TP_TCP” is a second-layer tunnel protocol (the abbreviation “L2TP” literally means “Layer 2 Tunneling Protocol”);
    • - “protocol=TCP” means which protocol the port being opened belongs to: if it is for UPD, then after the “equals” symbol it is necessary to write this abbreviation;
    • - “localport=xxxx” instead of “x” indicate the number of the port to open.

    Thus, opening a port on a computer is quite simple, and everyone can choose the most convenient method for themselves. The only advantage of using Windows Firewall is that step-by-step setup with an intuitive user interface.

    For some software products to function correctly, certain ports must be opened. Let's establish how this can be done for Windows 7.

    Before opening the port, you need to have an idea of ​​why you are performing this procedure and whether it needs to be done at all. After all, this can serve as a source of vulnerability for the computer, especially if the user gives access to unreliable applications. At the same time, some useful software products For optimal performance require the opening of specific ports. For example, for the game Minecraft it is port 25565, and for it it is 80 and 433.

    This problem can be solved using built-in Windows tools(Firewall and Command Line settings), and using separate third party programs(eg Skype, Simple Port Forwarding).

    But you should remember that if you do not use direct connection to the Internet, and the connection is via a router, then this procedure will bring results only if you open it not only in Windows, but also in the router settings. But we will not consider this option, since, firstly, the router is indirectly related to the operating system, and secondly, the settings of certain brands of routers differ significantly, so describe a certain model no point.

    Now let's look at specific opening methods in more detail.

    Method 1: uTorrent

    Let's start looking at ways to solve this problem in Windows 7 with an overview of actions in third-party programs, in particular in the uTorrent application. It must be said right away that this method Suitable only for those users who have a static IP.

    1. Open uTorrent. Click on the menu "Settings". Move by position in the list "Program settings". You can also use a button combination Ctrl+P.
    2. The settings window opens. Move to section "Compound" using the side menu.
    3. In the window that opens, we will be interested in the parameter block "Port Settings". To the region "Incoming connection port" enter the number of the port you need to open. Then click "Apply" And "OK".
    4. After this action, the specified socket (port bound to a specific IP address) must be open. To check this, click on the uTorrent menu "Settings", and then go to the item "Setup Assistant". You can also use a combination Ctrl+G.
    5. The Setup Assistant window opens. Check off the item "Speed ​​Test" can be removed immediately because this block is not needed for the task at hand, and checking it will only take time. We are interested in the block "Net". There must be a check mark next to its name. In the field "Port" should be the number that we opened earlier through the uTorrent settings. It is pulled into the field automatically. But if for some reason a different number is displayed, you should change it to the right option. Next click "Test".
    6. The procedure is running to check whether the socket is open.
    7. After the verification procedure is completed, a message will be displayed in the uTorrent window. If the task is completed successfully, the message will be as follows: "Results: the port is open". If the task cannot be completed, as in the image below, the message will be as follows: . Most likely, the reason for the failure may be that the provider provides you with a dynamic IP rather than a static one. In this case, you will not be able to open the socket via uTorrent. How to do this for dynamic IP addresses other methods will be discussed below.

    Method 2: Skype

    The next way to solve the problem involves using a program to Skype communication. This option also suitable only for those users to whom the provider has allocated a static IP.


    Method 3: "Windows Firewall"

    This method involves performing manipulations through “ Windows Firewall", that is, without using third party applications, but only using the resources of the operating system itself. Specified option will do both for users using a static IP address and those using a dynamic IP.

    1. To launch Windows Firewall, click "Start", then click on "Control Panel".
    2. Next click "System and Security".
    3. After that press "Windows Firewall".

      There are more quick option moving to the desired section, but requiring memorization of a specific command. It is carried out using a tool "Run". Call it by clicking Win+R. Enter:

      Click "OK".

    4. Any of these actions will launch the Firewall configuration window. IN side menu click « Additional options» .
    5. Now use the side menu to navigate to the section "Rules for incoming connections".
    6. The Inbound Rules Management Tool opens. To open a specific socket, we have to form a new rule. In the side menu, click "Create a rule...".
    7. The rule generation tool is launched. First of all, you need to choose its type. In the block “What type of rule do you want to create?” set the radio button to position "For the port" and click "Next".
    8. Then in the block "Specify the protocol" leave the radio button in position "TCP Protocol". In the block "Specify ports" put the radio button in position . In the field to the right of this parameter, enter the number of the specific port that you are going to activate. Click "Next".
    9. Now you need to specify an action. Set the switch to position "Allow connection". Click "Next".
    10. Then you should specify the type of profiles:
      • Private;
      • Domain;
      • Public.

      There should be a check mark next to each of these items. Click "Next".

    11. In the next window in the field "Name" you need to specify an arbitrary name for the rule being created. In the field "Description" You can optionally leave a comment on the rule, but this is not required. After this you can click "Ready".
    12. So the rule for TCP protocol created. But to provide a guarantee correct operation, you also need to create a similar entry for UDP for the same socket. To do this, press again "Create a rule...".
    13. In the window that opens, again set the radio button to the position "For the port". Click "Next".
    14. Now set the radio button to position « UDP protocol» . Below, leaving the radio button in position "Specific local ports", we set the same number as in the situation described above. Click "Next".
    15. In the new window we leave the existing configuration, that is, the switch should be in the position "Allow connection". Click "Next".
    16. In the next window, again make sure that the checkboxes next to each profile are checked, and click "Next".
    17. At the final step in the field "Name" enter the name of the rule. It must be different from the name that was assigned to the previous rule. Now you should press "Ready".
    18. We have created two rules that will ensure the activation of the selected socket.

    Method 4: "Command Line"

    You can complete the task using the Command Line. It must be activated with administrative rights.


    Method 5: Port Forwarding

    Let’s complete this lesson by describing a method using an application that is specifically designed to perform this task - Simple Port Forwarding. Application the specified program is the only option of all those described, by performing which you can open a socket not only in the OS, but also in the router parameters, and the user does not even have to go into its settings window. Thus, this method is universal for most router models.

    1. After launching Simple Port Forwarding, first of all, for greater convenience of working in this program, you need to change the interface language from English, which is installed by default, to Russian. To do this, click on the field in the lower left corner of the window in which the name of the current program language is indicated. In our case it is "English I English".
    2. A large list opens various languages. Select in it "Russian I Russian".
    3. After this, the application interface will be Russified.
    4. In the field "Router IP address" Your router's IP should automatically appear.

      If this does not happen, then you will have to drive it in manually. In the vast majority of cases this will be the following address:

      But it’s still better to make sure it’s correct through "Command line". This time it is not necessary to run this tool with administrative rights, and therefore we will launch it more in a fast way than we considered earlier. Dial Win+R. In the field that opens "Run" enter:

      Click "OK".

      Into the opened window "Command line" enter the expression:

      Click Enter.

      This will display basic connection information. We need the value opposite the parameter "Main gateway". This is what should be entered in the field "Router IP address" in the Simple Port Forwarding application window. Window "Command line" We don’t close it yet, since the data displayed in it may be useful to us in the future.

    5. Now you need to find the router through the program interface. Click "Search".
    6. A list with the name opens various models more than 3000 routers. In it you need to find the name of the model to which your computer is connected.

      If you don’t know the model name, then in most cases it can be seen on the router case. You can also find out its name through the browser interface. To do this, enter in address bar any web browser the IP address that we previously determined through "Command line". It is located near the parameter "Main gateway". After it is entered into the address bar of the browser, click Enter. The router settings window will open. Depending on its brand, the model name can be viewed either in the window that opens or in the name of the tab.

      After this, find the name of the router in the list provided in the Simple Port Forwarding program and double-click on it.

    7. Then in the program fields "Login" And "Password" standard for specific model router data account. If you previously changed them manually, you should enter the current ones on at the moment login and password.
    8. Next, click on the button "Add Entry" ("Add entry") in the form of a sign «+» .
    9. In the window that opens for adding a new socket, click the button "Add special".
    10. Next, a window opens in which you need to specify the parameters of the socket to open. In the field "Name" write down any arbitrary name, not exceeding 10 characters in length, by which you will identify this entry. In the area "Type" leave the parameter "TCP/UDP". This way we won't have to create a separate entry for each protocol. In the area "Start Port" And "Terminal port" Enter the number of the port you are going to open. You can even enter a whole range. In this case, all sockets of the specified number interval will be open. In the field "IP address" The data should be pulled up automatically. That's why existing value don't change it.

      But just in case, you can check it. It must correspond to the value that is displayed next to the parameter "IPv4 address" in the window "Command line".

      After everything specified settings produced, click the button in the Simple Port Forwarding program interface "Add".

    11. Then, to return to the main program window, close the add port window.
    12. As you can see, the entry we created appeared in the program window. Select it and click "Run".
    13. After this, the socket opening procedure will be performed, after which the following message will be displayed at the end of the report "Adding complete".
    14. So, the task has been completed. Now you can safely close Simple Port Forwarding and "Command line".

    As you can see, there are many ways to open a port, both using built-in Windows tools and using third-party programs. But most of them will only open the socket in the operating system, and opening it in the router settings will have to be done separately. But still there are individual programs, for example Simple Port Forwarding, which will allow the user to cope with both of the tasks mentioned above simultaneously without manual manipulation of the router settings.

    When there is a need to open Windows port? Then, when the built-in program network protection computer - Windows Firewall, also known as Firewall, blocks the operation of a particular application. Often such bans include games that require Internet access or other useful programs. To open a port, do the following.

    You can change the firewall settings in the corresponding section of the “Control Panel”, from where you need to go to the “System and Security” section, and then to “Windows Firewall”. Or press the “Win+R” combination and enter “firewall.cpl” in the “Run” window that opens, and you will quickly be taken to desired page. IN latest versions In Windows, you can find the desired program or the “Control Panel” section through “Search” in the desktop menu. Then you are only interested in the “Advanced Settings” section, located on the left side of the settings window. Then, in the Windows Firewall with Advanced Security window, find Inbound Rules and click on them. A list of existing rules will appear, but you will have to create a new one. To do this, click Create Rule in the Actions window (located on the right side of the screen). Now the Connection Wizard will help you configure the port, sequentially asking you to set its parameters. In the “Rule Type” window, you need to select “For Port” and click “Next”. In the "Protocols and Ports" window, define two parameters - protocol type and port. If you know the specific port number you need, enter it in the "Specified local ports" column. It is also acceptable to indicate a range, for example, 1244-1250. As for the protocol, TCP is usually required, but sometimes a UDP port is also needed. In this situation, you will need to create two rules in turn. Clicking "Next" will take you to next stage settings. Select “Allow connection” in the “Action” window, click “Next”, and without changing the parameters in the next “Profile” window, click “Next” again. Last action– come up with a name for the port and, if desired, a description, since after a while you may not remember what kind of port it is. And don't forget about the "Done" button. The procedure for opening a port is exactly the same for Windows Vista, 7, 8 and 8.1. If you have Windows XP, go to the necessary settings You can go through “Start” – “Network Neighborhood”, then you need to click “ Network tasks" - "View network connections" Right-click on the Internet connection icon and select “Properties” – “Advanced” – “Options”. Open a new port by clicking “Add”, then enter the name or IP address of the port in the appropriate field. Specify the port numbers (any numbers) in the “External port” and “Internal port” fields, then the port type and click “Ok”.

    Quite often windows users 7 are having trouble opening a port in the firewall. This situation occurs during installation new program or to be able to play games online. If you don’t know exactly how to do this, you can waste a lot of time and nerves on this activity. So, to open the port, first go to the Start menu - select Control Panel. In the left top corner Click System and Security.
    In the menu that opens, select the Windows firewall item - it is second on the list.
    The firewall menu will open in front of you, where you can see its status: whether it is open or closed, active networks, notifications. On this page, select the “Advanced options” item in the upper left corner - a window will open in front of us “ Windows firewall in high security mode."
    Here also on the left top menu select the item “Rules for incoming connections”, in the window that opens you can see a list of rules allowed for incoming connections. Next, in the upper right corner, click “Create a rule”, after which the wizard for creating a rule for a new incoming connection will open in front of us. Here we select the type - the rule that controls connections for the TCP port( Transmission Control Protocol - transmission control protocol) or UDP( User Datagram Protocol- user datagram protocol). Select the port and click next. A window will open where you need to select a protocol and specify ports: you can choose all ports or manually enter a specific local port - this is a certain number of numbers and dots. This figure can be individual for each specific task. Click next again. A window will open in front of us where we need to select the Allow connection option and click Next again. A window will open in front of us: “For which profiles the rule applies” - domain, private, public. You can select all and click next. Then we enter the name and description of the rule and that’s it – click ready, the port is open. You can see the name of this rule in the list of rules.
    The port remains open at all times, so close ports when they are no longer needed.

    Opening the port may be needed by almost any person using a computer with ten installed or any other operating system. In this guide, we'll show you how to open ports on your computer using the built-in Windows firewall, through a router, and by changing the settings of your antivirus software.

    Why do you need to open ports?

    There are many applications and games that connect through a specific port when using the Internet. , for security reasons, blocks their free use. Also, such connections are impossible without the appropriate settings of the router or, if one is set to. The user must allow access himself by setting the appropriate settings.

    Port check

    You can check whether a particular port is open on your PC using special services or command line systems. To do this online, you will need to do the following:

    The service will display the current port status.

    To check the port using a special command you will need:


    You will see a list of currently open ports.

    Opening a port in the firewall

    To configure ports using the firewall built into the system, you will need to set connection rules. This can be done by performing the following operations:

    1. Open "Control Panel" via search in the start menu.
    2. In the next window, go to "Defender Firewall" Windows » .
    3. Click .

    In most cases, you need to create 2 rules - one for incoming connections and the second for outgoing connections.

    1. Select link "Rules for incoming connections" and click "Create Rule" .
    2. In the next window, select the option "For the port" .
    3. Click "Next" .
    4. Select the protocol through which the application for which you are opening the port will operate.
    5. Check the option "Specific local ports" .
    6. Enter the port number.
    7. Click on the button "Next" .
    8. Select the profiles to which the created rule will be applied.
    9. Click "Next" .
    10. Give the rule a name and enter its description.
    11. Click "Ready" .

    The same steps must be done with a different protocol if the application for which you are opening the port uses several connection types.


    Router settings

    Once you have opened access through the firewall, you will also need to change the router settings. To do this you need to do the following:

    1. Open a browser and enter the IP address of your router.

    Typically this is 192.168.1.1 or 192.168.0.1 (the exact address of the router can be found on its panel or in the instructions).


    After completing the setup, you need to reboot the router, after which the ports will become available.

    This operation can be performed in different ways, depending on the router model.

    Opening a port in antivirus

    Providing access in the firewall and router settings may not be enough, as the connection may be blocked. Let's look at how you can open a port using an example. To do this you will need to do the following:

    1. Go to the application settings by clicking on the gear button.
    2. Select section "Additionally" and go to the tab "Net" .
    3. Next click "Choose" .
    4. From the list that appears, select "Add" .
    5. Enter a description of the rule and specify the port number.
    6. Click "Add" .

    After this, it is advisable to reboot the system. Additionally, you can add the application for which you are configuring the port to exceptions so that the antivirus does not block it.
    The procedure for accessing a specific port is not a particularly complex operation. By acting in accordance with these instructions, you will be able to carry out your plans without any problems.