Do-it-yourself local network over the Internet. How to connect a remote computer to your home TV via the Internet

Sometimes it becomes necessary to connect to your home or using the worldwide global network. The solution to this kind of problem would be to install within the local network, which would be accessible from the Internet for a remote user. One of the main requirements for such a connection is good security, because unprotected data can be intercepted by intruders and used for harm. To avoid this unpleasant situation, the VPN gateway encrypts data based on one of the encryption algorithms.

One of the options for installing a VPN gateway to create a local network over the Internet will be to allocate a server with the CentOS 6 operating system, on the basis of which you need to “raise” and configure the OpenVPN service. This software product is free and open source.

How to create a local network over the Internet: installing OpenVPN

So to set up local network via the Internet, you need to have CentOS pre-installed on your server.

In addition, you should also make sure that the SSH service is working, with the help of which console access is carried out. The next step is to connect the EPEL Linux repository. For the 32-bit version of CentOS, it will look like this:

You need to uncomment the line that starts with "push" - this will allow your client systems to route through OpenVPN.

The same must be done for the lines relating to Google's root DNS servers.

In addition, to improve security settings, prevent the openvpn user from logging into your server by uncommenting the following lines:

Accessing a local network via the Internet: generating keys and certificates using the easy-rsa utility

After you finish modifying the configuration file, you need to generate the necessary keys and certificates. By default, OpenVPN places the necessary scripts in the documentation folder. Create a folder and copy the necessary files into it:

vim /etc/openvpn/easy-rsa/vars

We are looking for variables starting with “KEY_” - they are usually located at the bottom of the file. The names of these variables are intuitive - you just need to fill in the required information.

Sometimes it happens that OpenVPN cannot detect the version of OpenSSL required to generate security certificates. To do this, copy the necessary configuration file to the working folder and create a Certification Authority, after which you can generate server certificates:

You also need to generate exchange keys using the Diffie-Hellman algorithm and copy them together with certificates to the working folder:

Now, in order to access the local network over the Internet, you need to create certificates for VPN clients so that they can authenticate to the server. This procedure must be performed for each client or device that connects to the local network using VPN:

Routing parameters and starting the OpenVPN server

Create an iptables firewall rule to ensure that your VPN subnet is routed correctly (eg 10.7.7.70/24). Also enable/check the ability of the server to route packets by editing the sysctl.

Now you have a fully functioning VPN server configured for the local network via the Internet.

OpenVPN client configuration

To connect via the Internet to a local network for the client side, the following files should be obtained from the server: ca.crt, client.crt and client.key. Copy them using FTP or SFTP protocol to a local directory. Be careful as the client.crt and client.key files are named automatically based on the information specified earlier with the “./build-key” directive. All necessary files are located in the /etc/openvpn/easy-rsa/keys folder.

Next, we create another client.ovpn file with client settings such as the external IP address of the VPN server (replace “x.x.x.x” with the server’s actual external address), port, protocol, and so on. The main rule is to store this file very carefully and not let it fall into the wrong hands - because in this way an attacker can get direct access via the Internet to your local network.

Thus, all the necessary information for establishing a connection to a local network via the Internet is collected in one file with the “.ovpn” extension.

For client PCs with Windows OS, you need to download the installation package from the official OpenVPN website and place the above four files in the folder with the installed client, and also make sure you have administrative rights to run the program.

For a Linux PC, simply install OpenVPN from the official repository and run it with the “.ovpn” file parameters:

Now you can easily connect to a local network via the Internet from anywhere in the world where you can enter the global network.

Greetings to all readers.

Most computer games (even those that came out 10 years ago) support multiplayer game: either over the Internet or over a local network. This, of course, is good, if not for one "but" - in many cases, connecting to each other without using third-party programs - will not work.

There are many reasons for this:

For example, the game does not support playing over the Internet, but there is support for local mode. In this case, you must first organize such a network between two (or more) computers on the Internet, and then start the game;

The absence of a "white" ip address. It's more about organizing Internet access by your provider. Often in this case, you can’t do without the use of software at all;

The inconvenience of constantly changing the IP address. Many users have a dynamic IP address that is constantly changing. So, in many games you need to specify the IP address of the server, and if the IP changes, you have to constantly drive in new numbers. To avoid doing this, specials will come in handy. programs…

Actually, we will talk about such programs in this article.

game ranger

Supports all popular Windows versions: XP, Vista, 7, 8 (32/64 bits)

GameRanger is one of the most popular online gaming software. It supports all the most popular games, among them there are all the hits that I simply could not help but mention in this review:

Age of Empires (The Rise of Rome, II, The Conquerors, Age of Kings, III), Age of Mythology, Call of Duty 4, Command & Conquer Generals, Diablo II, FIFA, Heroes 3, Starcraft, Stronghold, Warcraft III.

In addition, there is just a huge community of players from all over the World: more than 20,000 - 30,000 users online (even in the morning / night hours); about 1000 created games (rooms).

During the installation of the program, you will need to register by entering a working email (this is required, you will need to confirm the registration, besides, if you forget your password, you will not be able to restore your account).

After the first launch, GameRanger will automatically find all the installed games on your PC and you will be able to see the games created by other users.

By the way, it is very convenient to look at the server ping (marked with green bars:): the more green bars - the better the quality of the game will be (less lags and errors).

AT free version program, you can add 50 friends to bookmarks - then you will always know who and when online.

Works in: Windows XP, 7, 8 (32+64 bits)

A rapidly growing program for organizing network games. The principle of operation is somewhat different from GameRanger: if you enter the created room there, and then the server starts the game; then here for each game there are already their own rooms for 256 players - each of the players can launch their own copy of the game, and the rest can connect to it, as if they were on the same local network. Comfortable!

By the way, the program has all the most popular (and not popular) games, for example, I took a screenshot of the strategies:

Thanks to such lists of rooms, you can easily find friends in many games. By the way, the program remembers "your rooms" that you entered. In each room, in addition, there is a good chat that allows you to negotiate with all the players on the network.

Outcome: a good alternative to GameRanger (and maybe soon GameRanger will be an alternative to Tungle, because Tungle is already used by more than 7 million players around the world!).

Of. website: http://www.langamepp.com/langame/

Full support for Windows XP, 7

This program was once unique in its kind: nothing easier and faster to set up simply could not be found. LanGame allows people from different networks to play games where this option is not provided. And for this - you do not need an Internet connection!

Well, for example, you and your comrades are connected to the Internet through one provider, but in the network game mode, you do not see each other. What to do?

Install LanGame on all computers, then add each other's IP addresses to the program (do not forget to turn off the Windows firewall) - then all that remains is to start the game and try again to enable the game mode over the network. Oddly enough - the game will start a multiplayer mode - i.e. you will see each other!

Although, with the development of high-speed Internet, this program is losing its relevance (because even with players from other cities you can play with very low ping, despite the lack of a “local network”) - and yet, in narrow circles, it can still be popular for a long time.

Hamachi

Works in Windows XP, 7, 8 (32+64 bits)

Once upon a time, Hamachi was a very popular LAN over the Internet software used in many multiplayer games. Moreover, there were very few worthy competitors.

Today, Hamachi is more needed as a "safety" program: not all games are supported by GameRanger or Tungle. Sometimes, some games are so "capricious" due to the lack of a "white" IP address or the presence of NAT devices - that there are simply no alternatives to playing, except through Hamachi!

In general, a simple and reliable program that will be relevant for a long time. Recommended to all fans of rare games and those connected to the Internet through "problem" providers.

Alternative programs for playing online

Yes, of course, my list of 4 programs above did not include many popular programs. However, I relied, firstly, on those programs with which I had experience to work, and, secondly, in many of them online players are too small to be considered seriously.

For example, GameArcade- a popular program, however, in my opinion - its popularity has been falling for a long time. In many games there is simply no one to play with, the rooms are empty. Although, for hits and popular games - the picture is somewhat different.

Garena- also a fairly popular program for playing on the Internet. True, the number of supported games is not so large (at least during my repeated tests - many games could not be launched. It is possible that now the situation has changed for the better). As for hit games, the program has gathered a fairly large community (Warcraft 3, Call of Duty, Counter Strike, etc.).

That's all, I would be grateful for interesting additions ...

The local network makes it possible to move files between computers, run and use games and programs together, distribute the Internet. Connecting computers to a common network allows you to protect owners from the penetration of viruses into systems. There are several ways to combine PCs with different operating systems into a single local area network.

Hardware combination of computers

Hardware bonding uses technical devices that allow multiple PCs to access a common network.

Via cable

The easiest way to connect. To combine, you need a special cable, a cross-over. Both ends of the cable are included in computers. One of the devices transfers the Internet connection to the other, which unites them into a network.

The main disadvantages of the method:

  • Only 2 devices can be connected;
  • There is a limitation on cable length;
  • The extra cable gets in the way and can get tangled.

Through a router

With the help of a router, a local network can connect any number of computers and laptops. A router is connected to one of the devices, it will distribute the network to other PCs. It is important that these devices support Wi-Fi connection mode. In this case, the setting of the IP address and access between PCs is set automatically.

The only thing that is required from the user is to enter the same computer names in the connection center.

If the device memory contains important files that other network users should not have access to, just right-click on the folder and go to the access settings.

LAN setup

Turning on devices, connecting a cable or router to them are not the only steps necessary to create a local network. When merging, it is important to properly configure the computers.

When connected via cable

The detuning algorithm given below must be carried out on both computers to which the cable is connected.

Setting the workgroup and PC name

This action will allow you to set the same name for devices connected by cable. For this you need:

  1. Press the key combination Win + R;
  2. 2. Enter the universal command in the input field sysdm.cpl (suitable for any versionWindows);
  3. Press the "Change" button;
  4. Enter a name for the computers of the working group (required in Latin);
  5. Save.

The same name is entered on the second device.

Setting up IP, gateways and masks, DNS

On modern Windows 8-10 operating systems, this procedure is a simple check mark in the network control center.

Owners of PCs with older system versions need to go through the algorithm:

After that, the computers will be combined into a single network.

Opening access to files, folders, printer

As mentioned above, on Windows 8-10, the procedure for sharing access and network settings comes down to selecting options in the connection center. Additionally, you can set general passwords for the PC.

On other versions of Windows:

  1. Start button;
  2. Control Panel;
  3. Folders settings;
  4. Click on the item using the sharing wizard;
  5. Save and close;
  6. Go to the "My Computer" window;
  7. Find the name of the PC, right-click and click "Change";
  8. In the settings, click the checkbox next to the ratio of the device to the workgroup;
  9. Go to the access tab, confirm permission for devices.

Internet access on a second PC

If the donor computer is connected to the Internet, the second device can also be connected to the network. To do this, you need to set the same connection settings as on the donor.

When connected via a router

In this case, the user needs fewer steps to configure connections on computers. WiFi connection less demanding on settings, installed automatically.

Checking the connection with computers

You need to reboot the router using the button on the rear panel. Thus, the setting of the router itself will be correct, such as it was set by the manufacturers. The router automatically assigns addresses to computers that are in its network area.

You can check if all computers are connected to the router via Wi-Fi in the following way:

  1. Open a browser, enter 192.168.1.1 in the address bar;
  2. Enter the DHCP tab;
  3. Find the IP address of the PC that will be connected to the local network;
  4. Run command line, enter "ping IP of another PC";
  5. Wait for the end of the check.

If you want to play on two PCs without using the Internet, instantly transfer files from different devices without USB media, then you need to know how to create a local network between two computers. This technology for connecting two PCs has been used for a long time, and even today it has not lost its relevance.

LAN Example

A local network is a group of interconnected devices: PCs, TVs, printers, usually located no further than one room. Devices use shared memory, servers, thus complement each other. Such a connection allows you to create a gaming zone for several PCs, transfer any data freely and fairly quickly, print documents if one shared printer is installed, and do much more. Combining devices today is more often done using a router, but other connections can also be used, which you can read about below.

Create a connection

It is quite easy to create a connection, as well as in different ways: through a router or cable. The device settings for both methods are quite similar. The difference lies mainly in the connection method: via cable or via Wi-Fi.

Communication via Wi-Fi, which is much more common today, can be much more convenient, but connecting two PCs with a cable will cost less if you have not yet installed a router for some reason.

Connection via cable

The oldest form of communication between two machines. It only needs to connect an RJ45 network cable. The cable must be crossover, although regular straight-through cables can often be used with modern computers. Nevertheless, when buying, it is better to check the type of cable with the seller. When adding the ends of a crossover cable, the colors of the ends of the wires will differ - this is its main difference. Also, the connection requires network cards on both devices, but today they are already installed. One has only to note that if the network card is already busy with an Internet connection, then you will not be able to use it.

Such a connection was just used before in order to play. But someone may be comfortable today, especially if you still have an operating room. windows system XP, which has difficulty supporting wireless connections.

After connecting the cable itself, you need to know how to set up a local network between two computers:

  • Control Panel, select the item relating to network connections.
  • We select the one we created there, right-click on it, select "Properties"
  • Further, depending on the "Windows": for Windows XP, select the Internet Protocol (TCP / IP), for Windows 7/8/10 - Internet Protocol version 4.

  • Manually enter the IP address: 192.168.xxx.xxx. The last six digits can be entered independently, the main thing is that they do not repeat for different devices.

  • On Windows 7, you will also need to go to the Network and Control Center, there, through the "Settings" item, select "Private" for our network.
  • Then in the Control Center, enable file sharing, network discovery, and disable password protection.

After that, you must also set up sharing. This is done so that PCs can exchange any files. Methods differ on different OS. On WindowsXP:

  1. Chapter Network connections, go to "Tools", select "Folder Options".
  2. View tab, check the box next to Use simple file sharing.
  3. Next, go to the "System Properties" window: RMB on "My Computer" - select Computer Name.
  4. We click "Change", select "Is a member" - the working group. We come up with a common group name for both PCs.
  5. My computer, right-click on hard drives (for example, Windows (C :)), in the "Access" tab, click on the link, set the sharing permission.

That's it, access to the files of the selected disks is completely open. With Windows 7/8/10 we proceed as follows:

  • Control Panel, then Folder Options.
  • Check the "Use Sharing Wizard" checkbox.
  • The next steps will be the same as for XP.

Connection via router

This is the most convenient method, as it allows you to connect not only two, but more computers or other devices that support Wi-Fi. You can play on such a connection without long settings.

IP-addresses with such a connection will be set automatically. To use shared files, you will only need to share files, and then add two computers to the same workgroup, as described above.

Now, to transfer files, you just need to enter, using the address bar, the computer name: \\name\. You can also do this through the Network Connections section. It is also worth securing your personal or especially important files so that no one can access them from a neighboring computer. To do this, it is best to specify disks that do not contain information that is important to you. For example, a disk containing data accounts users, it is better not to make it open to everyone, or, using the settings menu for files and folders, restrict access to them: RMB on the desired folder, then select the sharing settings there.

LAN game

So, we managed to connect two devices to the same network without the Internet, let them exchange files. How to start playing on a local network?

For this, as a rule, no additional settings are needed. We just turn on the game and, if it is possible to play on a local connection, select the appropriate item, and then play on the one we have already created.

For different games, the connection to the shared server may vary. Somewhere you will need to enter the IP or PC name. For Minecraft, Counter Strike, for example, you will need to create a server. But as a rule, everything is done quite simply.

Hamachi

This happens quite rarely, but sometimes a game does not allow you to play via the Internet, but it allows you to play on a local network. Do not despair, even if it turned out that your friend lives far away from you.

The Hamachi program allows you to emulate a local connection and thus connect a PC to it via the Internet. To do this, you just need to download the program, register, and then create a new connection, come up with a name for it and, if necessary, a password. After that, you can easily use this network to play the game.

As you can see, connecting computers to a local network is a fairly easy process. It doesn't take much of your time, and you can connect two PCs and then play with your friends, both being away from them and being in the same room with them.

Ways to create a connection are suitable for all Windows, starting with XP, ending with the "Ten".

I already had one article on my blog about organizing a local network over the Internet using , but today we'll talk about another service used for similar purposes - OpenVPN.

What are we talking about? About how to link two or more computers located in completely different places into a single local area network. That is, physically they will be far from each other, but virtually - as if in the same local network. What does it give?

  • Ability to share files over the network;
  • The ability to run some type of program that accesses from one computer to another;
  • Ability to play games together and much more.

The article itself was not written by me, it was suggested to me by one of the regular participants of our forum, NicromanseR, for which I am very grateful to him. I myself have only slightly edited the article so that it fits more into the style of this blog.

So, how to make a LAN over the Internet using OpenVPN? The task is not entirely simple and will require a certain amount of manipulation, but the proposed instruction describes them in sufficient detail.

So, download the distribution kit of the program from the official site, unpack it and install everything by default. Attention! You need to confirm the installation of the TAP-Win32 Adapter V9 network adapter driver when Windows asks for it.

openvpn server

One of the computers will act as an Openvpn server, other computers will connect to it. It is desirable that it has a dedicated (permanent) . Let's start with setting it up.

  1. Run the window command line Start - Run (or Win + R) - cmd.exe
  2. The hardest part of the setup is generating certificates and keys. Here you need to be extremely careful and follow the instructions exactly. In the console window, without quotes, enter "cd C:\Program Files\OpenVPN\easy-rsa" where C:\Program Files\OpenVPN\ is the folder with installed program. The console window is not closed.
  3. Enter again without quotes "init-config"
  4. Edit the vars.bat file and set the following parameters: KEY_COUNTRY, KEY_PROVINCE, KEY_CITY, KEY_ORG, KEY_EMAIL. These parameters cannot be left blank, the rest can be left as default. Example:

    set KEY_COUNTRY=EN
    set KEY_PROVINCE=MO
    set KEY_CITY=Moscow
    set KEY_ORG=GazProm
    set [email protected]
    set KEY_CN=changeme
    set KEY_NAME=changeme
    set KEY_OU=changeme
    set PKCS11_MODULE_PATH=changeme
    set PKCS11_PIN=1234

    In a standard notepad, you will not be able to edit this file, so I used the Notepad ++ program.

  5. We enter in turn the commands "vars" "clean-all" and "build-ca". The last build-ca command will ask for parameter values. All parameters can be left unchanged by pressing Enter, except for one - Common Name. Here you need to enter some name, I entered the name of the organization.
  6. Now let's generate a certificate and a key for the server by executing the command: "build-key-server server" As in the previous command, all parameters can be accepted by default, but for the Common Name, enter the word "server". Answer the last two questions "Sign the certificate?" and "1 out of 1 certificate requests certified, commit?" in the affirmative by pressing "y"
  7. Now let's generate keys for clients by running the commands:
    "build key client1"
    "build key client2"
    (these are commands for two branches, by analogy, you can make keys for more)
  8. Like last time, we accept all parameters, except for the Common Name, for which we specify client1 and client2, respectively. Answer yes to the last questions. It remains to execute one more command: "build-dh"
  9. So, as a result of executing all the commands, we will get a number of key and certificate files in the C:\Program Files\OpenVPN\easy-rs\keys folder. Go to the C:\Program Files\OpenVPN\config folder on the server and copy the contents of the .\easy-rs\keys folder there. Copy separately the following files for client machines: ca.crt, client1.crt, client1.key, client2.crt, client2.key to a safe place, then they will need to be transferred to the computers of connected clients. That's all with the server, you can start the OpenVPN Service, you can make the service start automatically if necessary (via Start - Control Panel - Services), but it remains to make the config for the server. I want to make a note right away that on Windows clients and servers, the path must be written through a DOUBLE "\\". And so, let's go to the C:\Program Files\OpenVPN\config folder and create the "server.ovpn" file there, its content should be something like this:

    port 5194
    proto udp
    dev tune
    subnet topology
    ca C:\\Program Files\\OpenVPN\\config\\keys\\ca.crt
    cert C:\\Program Files\\OpenVPN\\config\\keys\\server.crt
    key C:\\Program Files\\OpenVPN\\config\\keys \\server.key # This file should be kept secret
    dh C:\\Program Files\\OpenVPN\\config\\keys\\dh1024.pem
    server 10.218.77.0 255.255.255.0 # vpn subnet
    ifconfig-pool-persist ipp.txt # IP addresses of clients will be stored here
    push "route 192.168.78.0 255.255.255.0"
    keep alive 10 120
    comp lzo
    persist key
    persist-tun
    status openvpn-status.log
    log-append openvpn.log
    verb 4
    mute 20
    client-to-client
    client-config-dir C:\\Program Files\\OpenVPN\\config\\keys

The config is ready, it remains to create 1 more file with the name "ipp.txt" and the following content:

client1,10.218.77.10
client2,10.218.77.11
client3,10.218.77.12

That's it, you can still lag behind the OpenVPN server. Let's move on to setting up the client part for creating a local area via the Internet.

openvpn client

To configure the Openvpn client, Go to the folder at C:\Program Files\OpenVPN\config and create a file there "client.ovpn" with the following content:

remote my_server 5194
client
dev tune
proto udp
subnet topology
persist key
persist-tun
ca C:\\Program Files\\OpenVPN\\config\\keys\\ca.crt
cert C:\\Program Files\\OpenVPN\\config\\keys\\client1.crt
key C:\\Program Files\\OpenVPN\\config\\keys\\client1.key
comp lzo
verb 4
mute 20

Here you need to change the value of "my_server" to the IP address of your server. Copy the ca.crt, client1.crt, client1.key files to the C:\Program Files\OpenVPN\config\keys folder for the "client1" user and the ca.crt, client2.crt, client2.key files for the second client (if you are planning more than two). This completes the OpenVPN client setup. Let's try to connect.

Note (Sunder): If you configure everything correctly, then after starting the service on the server and sessions on the clients, your computers will be on the same local network. Technically, it will look like you have a new network adapter that functions as a LAN over the Internet. And further. OpenVPN is a free and open source product, so you do not work through a black box, you are not tied to other people's servers, in general, with this technology you get real protection from the outside world. In addition, OpenVPN works great under , so you can even link computers with completely different operating systems to each other.

If you have any questions, write, we will try to help.

mob_info