• Fedora server network infrastructure setup. Setting up a network at home. Connect online accounts

    My first contact with Linux took place about six years ago. Then it was some kind of freshly released Red Hat, which my friend and I were able to install, but we still couldn’t get into it.
    However, this is not what the article is about. Later, almost all families of Linux distributions passed through my hands and head, and everywhere I noticed my approaches to network auto-configuration. And in this series of articles I will try to highlight the most popular of them. I hope they will be useful to those users who are still clicking on buttons and checking boxes in graphical settings managers, but already understand that this is not true :)
    Perhaps these articles will also be informative for those who (not out of great knowledge) write their own network management scripts and place them in some rc.local

    For the above tunnel, these files might look like this.

    rule-tun0:
    from 10.0.0.2 lookup mytable

    route-tun0:
    default dev tun0 table mytable
    192.168.0.0/24 dev tun0

    By creating these files, we relieve ourselves of the headache of having to ensure that the corresponding rules and routes are created and deleted when raising and lowering the interface, respectively.

    Another interesting feature is the automatic creation of aliases. If you have an eth0 interface with the address 192.168.0.1, and you want to add 192.168.0.2, then just create a file ifcfg-eth0:1, where you can enter, in addition to the above parameters (IPADDR, NETMASK, and so on), one more - REALDEVICE =eth0.
    If suddenly there is a need to create a large number of aliases, but you don’t want to create separate files for each, then there is a way out: ifcfg-eth0-range will save us, which can look like this:
    IPADDR_START=192.168.0.5
    IPADDR_END=192.168.0.15
    CLONENUM_START=3

    This example will create interfaces eth0:3 - eth0:13 with addresses from 192.168.0.5 to 192.168.0.15.

    And finally, we cannot help but mention the ifup.d and ifdown.d directories, located there (in /etc/sysconfig/network-scripts).
    In these directories you can place your files, which will be executed when the interface is raised and lowered. Your scripts will be passed one parameter $1 - this is the name of the interface that was raised or lowered.

    Having a network configured according to these principles, you can always raise/lower a separate interface with the command ifup name (ifdown name), where name is your interface. To reboot the entire network, just type service network reload.

    Modem to modem is different. Modems differ in various ways, but the main ones are the method of connecting to the computer and organizing interaction with it.

    The modem can be connected either to a COM port or to a USB bus. Earlier at Linux had problems recognizing USB modems, but now everything is fine, as long as the modem is hardware. And this is precisely the second sign.

    There are software and hardware modems. In the second case, the modem has its own processor. And we can say that it works with the central processor on equal terms. But if the modem is software, then the driver program “thinks” for it. The logic of manufacturers producing software modems is simple: the user does not care how the modem works, only the result is important to him - so that it can be used to connect to the Internet, but the software modem will be cheaper to produce. Modern processors are so powerful, and modern operating systems are so bulky, that the execution of yet another program - the software modem driver - is completely invisible to the user (i.e., there is no performance penalty). But for some reason, software modem manufacturers forget to create drivers for Linux: as a rule, there are drivers only for Windows, which is why software modems are often called Win-modems.

    When we talked about how to connect a modem to a computer, we forgot to mention internal modems. This was done intentionally - usually these are software modems (they are made internal to further reduce the cost).

    If you want to use a modem in Linux, then you need to buy a hardware modem, i.e. Before buying a modem, you need to ask what kind of modem it is - software or hardware. If the seller himself doesn’t know, then don’t lose the receipt - if you can’t set up the modem in Linux, you have the legal right to return it (as long as the receipt and packaging are intact).

    Some Win modems can still be made to work in Linux. On the website http://linmodems.org/ you can find drivers (in Linux, drivers are called modules) for some Win modems.

    2.1.2. Setting up a modem connection using the system-config-network configurator

    All network connections in Fedora are configured using the system-config-network configurator. But it is inconvenient to use it for a modem connection - you cannot specify several dial-up numbers, a special initialization string, etc.

    However, once we still have to use the system-config-network configurator: we need to connect to the Internet to install the gnome-ppp program, which has all the functions necessary for the dialer (dialer program).

    Before starting the network configurator, the modem must be connected to the computer and turned off. If you have a COM modem, then before connecting it you need to turn off the computer. But a USB stick can be connected “on the fly”, i.e. without turning off the computer's power.

    So, press ‹Alt+F2› and enter system-config-network. The system will ask you to enter the root user password (Fig. 2.1). Enter it and you will see the network configurator window. Click on the Create button on the configurator toolbar,

    In the window that opens, select the Modem connection option and click the Next button (Fig. 2.2). Then you will see a window that says Search for a modem. Wait until the configurator detects your modem. If the modem is supported by Linux, then there should be no problems with detection.

    Rice. 2.1. Entering the root password

    Rice. 2.2. In the network configurator window, you need to select the Modem connection option


    The configurator will prompt you to clarify the connection parameters (Fig. 2.3), but, as a rule, this is only a formality - they will already be automatically set correctly.


    Rice. 2.Z. Check connection settings

    The next step is to enter the phone number to dial, as well as your login and password. If necessary, you can enter a prefix for accessing the line and the city code (Fig. 2.4).


    Rice. 2.4. Setting the dial-up phone number, login and password

    After this, you need to set the IP protocol parameters. Usually you can leave everything as it is (Fig. 2.5) - after all, the IP address and other network parameters are usually transferred to our computer from the provider’s DHCP server.



    Rice. 2.5. Configuring IP protocol settings

    This completes the modem connection setup. You will see summary information about the connection - provider name, user name and phone number (Fig. 2.6). If everything is correct, click the Apply button.



    Rice. 2.6. Click the Apply button to confirm the creation of the connection

    To connect to the Internet, select the newly created connection in the configurator window and click the Activate button.

    2.1.3. GNOME-PPP program

    Once you are connected to the Internet, open a terminal window (menu command Applications→System→Terminal) and enter the commands:

    yum install gnome-ppp

    The first command will give you the root privileges needed to install programs, and the second will install the GNOME-PPP program. After installation, the command to launch the GNOME-PPP program will be placed in the Applications → Internet menu. Run it: (Fig. 2.7).

    Click the Settings button. The program settings window will open. In this window, first of all, click on the Detect button to allow the program to detect your modem. Then click on the Phone Numbers button and enter your provider's dialing numbers. Don't forget to also choose the dialing method - tone or pulse.

    Rice. 2.7. GNOME-PPP program window

    When you have set all the necessary parameters, click the Close button and you will be returned to the main GNOME-PPP program window. All you have to do is enter your username, password and click on the Connect button (Fig. 2.8). Just don’t forget to deactivate the connection created using the system-config-network configurator before doing this.

    Fig. 2.8. Establishing a connection using the GNOME-PPP program

    The GNOME-PPP program is much more convenient than the standard configurator, so I think that you will always use this program.

    2.2. ADSL connection

    2.2.1. Advantages of an ADSL connection

    Recently, ADSL connections (Asymmetric Digital Subscriber Line, asymmetric digital subscriber line) have been very popular. The reason for their popularity is simple: high speed and low cost. As a rule, an unlimited ADSL connection costs $20-30 per month, and its speed is approximately 128-256 Kbps. Actually, 256 Kbps is far from the limit for ADSL, but a faster connection will cost more than $30.

    In any case, even if you have a "budget" ADSL connection with a speed of only 128 Kbps, it is still better than a modem. The speed is almost 4 times higher than the speed of a modem connection and no connection dropouts! Plus, when you're surfing the Internet, the phone line is free. In the case of a modem connection, the telephone line is busy, and you also need to pay for the Internet

    I remember when at I had a dial-up connection and had to work a lot on the Internet, my monthly Internet bill (paying for the services of the telephone company and provider) exceeded $60. Now I pay 20 dollars a month: 5 GB of traffic and a speed of 1 Mbit/s (of course, I don’t need to pay for the phone anymore), so decide for yourself which is more profitable. Yes, you will have to pay 70-100 dollars for connection (without the cost of an ADSL modem, but you can rent one - then the monthly fee will be only a few dollars more), but it’s worth it.

    However, ADSL connections are not available to everyone. For an ADSL connection to work, you need a modern PBX and an ADSL provider. There are no problems with ADSL networks, since they are often national telecom operators, but not everyone still has a modern PBX. Therefore, if you need high-quality Internet, but an ADSL connection is not available, you will have to try other methods of connecting to the Internet, for example, satellite Internet or RadioEthernet technology (although it is more difficult to find a provider that works with RadioEthernet than an ADSL provider).

    In this book, we'll talk about how to set up an ADSL connection on Fedora, but first we'll figure out how to connect an ADSL modem.

    The ADSL standard belongs to the xDSL family of standards. The letter "A" in the name of the standard means that asymmetric data transmission is used, i.e. The data transfer speed in one direction (usually the speed of the incoming data stream, download) is higher than in the other (outgoing stream, upload). ADSL technology is popular among home users. This is due to the fact that home users usually download much more information from the Internet (for example, movies) than they upload to the Internet. You can read about other standards in the xDSL family at http://ru.wikipedia.org/wiki/XDSL.

    2.2.2. Connecting an ADSL modem

    The ADSL modem is connected to the computer using a regular Ethernet cable (twisted pair). There is no need to install any drivers, and the modem does not connect the cell to the telephone network directly, but through an ADSL splitter. Through this splitter you need to connect all the phones that are in the apartment.

    If you were to connect even one phone directly to the phone line rather than through an ADSL splitter, you would not be able to connect to the Internet.

    2.2.3. Setting up an ADSL connection

    After setting up an ADSL connection in Fedora, you need to launch the system-config-network network configurator (press Alt+F2, enter system-config-network and press Enter) (Fig. 2.9).

    Click on the CREATE button, then select the xDSL connection option and click on the Next button (Fig. 2.10).

    The next step is to set the connection parameters (Fig. 2.11). You need to select the network adapter to which the ADSL modem is connected (if you have several of them), then enter the name of the provider (this is an information field, you can enter whatever you want in it), username and password (this information can be checked with the provider ).


    Rice. 2.9. Network Configurator Window

    Rice. 2.10. Selecting the connection type in the network configurator window

    Rice. 2.11 Setting ADSL connection parameters

    Rice. 2.12. To establish an ADSL connection, just click on the Activate button

    2.3. Internet via local network

    2.3.1. Setting up a local network

    Internet over a local area network is most often found in enterprises or small home networks. As a rule, the network has a main computer - a gateway, which provides all other computers on the network with access to the Internet. This computer has two network interfaces: one for communication with computers on the local network, and the other for accessing the Internet.

    In order for other computers on the local network to be able to access the Internet, they must be configured accordingly. But here everything depends on the settings of the main computer - the gateway.

    If a DHCP server is installed on the gateway (this fact needs to be clarified with the network administrator), then the computers on the local network do not need to be configured at all: all the necessary network parameters will be received via the DHCP (Dynamic Host Configuration Protocol). We only need to make sure that the network interface is configured to use DHCP. To do this, press ‹Alt+F2› and enter the command system-config-network. Select the network interface eth0 and click the Edit button.

    Make sure that the network interface is configured to use DHCP (the switch is set to Automatically obtain an IP address using DHCP - Fig. 2.13).

    If the network interface is configured to use DHCP and a DHCP server is running on the network, then the dynamic host configuration protocol will automatically provide each computer with the following information:

    Host IP address;

    Network mask;

    Default gateway IP address;

    IP addresses of DNS servers.

    If your network does not have a DHCP server, then all the above information (IP address, netmask, etc.) must be obtained from the network administrator. Suppose our computer's IP address is 192.168.1.200, netmask is 255.255.255.0, gateway IP address is 192.165.1.1, then you should configure the network interface as shown in Fig. 2.14.


    Rice. 2.13. The network uses DHCP protocol

    Rice. 2.14. Configuring a network interface when there is no DHCP server on the network

    Please note: if you enter the gateway IP address incorrectly, the Internet will not be accessible!

    After that, click on the OK button to save the settings and in the network configurator window, go to the DNS tab. Enter the IP addresses of the primary and secondary DNS servers (you should get them from your network administrator) (Figure 2.15).

    Rice. 2.15. Setting DNS parameters

    In Fig. 2.15 IP addresses are provided as an example! You do not need to enter these exact values!

    In case you were wondering, the IP addresses you enter will be written to the /etc/resolv.conf file (this contains the DNS settings).

    Close the network configurator window and save the changes. You will see a message that in order for the changes to take effect, you need to restart the computer (Fig. 2.16).

    You can either restart the computer (menu command System→Shutdown→Restart), or open a terminal window (menu command Applications→System→Terminal) and enter the following commands in it:

    /etc/init.d/network restart

    Rice. 2.16. Restart your device or computer

    As you may have guessed, the last command is used to restart the network (Fig. 2.17), therefore you do not need to restart the computer (it’s faster!).

    Rice. 2.17. Restarting the network using a terminal

    2.3.2. Proxy settings

    Quite often on a local network, a proxy server is installed to cache traffic (therefore, to save it and speed up user access to the Network). Check its parameters (IP address or domain name and port number) with your network administrator. Then select the menu command System→Settings→Internet and network→Proxy service. In the window that opens, you need to enter the proxy server parameters. Typically, a proxy server is installed on the gateway, so its IP address will be the same as the gateway's IP address, and the port number will be 3128 or 8080 (Figure 2.18).


    Rice. 2.18. Proxy settings

    If there is a proxy server on the network, then the administrator can restrict access to the Internet, i.e. Some users will have access to the Internet, while others will not. It is clear that each user will be assigned their own login and password for authorization on the proxy server. If the network administrator told you your login and password, then in the Proxy server settings window, click on the Details button and enter them (Fig. 2.19).

    Rice. 2.19. Entering your login and password to access the proxy server

    2.4. Programs for working on the Internet

    2.4.1. Firefox is completely unprepared!

    Firefox is certainly a great browser, but not as originally presented to us in Fedora.

    A lot of modern sites contain Flash videos. And this is not surprising, because with the help of Flash you can create a beautiful and memorable website, and it will not take up megabytes of space, which means , will load quickly even for users still using modem connections.

    You won't be able to view Flash sites using Firefox. Of course, until you install the appropriate plugin.

    Also, you won't be able to open PDF files in Firefox. Even search engines have learned to index PDF files, but Firefox does not allow you to view them. Of course you can download the PDF - file and open it in Acrobat Reader (the Acrobat Reader version for Linux is available for free on the Adobe website - www.adobe.com). But it’s much more convenient to click on the link and in a couple of seconds (or minutes - it all depends on the connection speed and the size of the PDF file) the document will be loaded into the browser window!

    We will discuss how to eliminate these shortcomings in this section. In the meantime, our Firefox can’t do anything. To verify this, open the Firefox browser and enter about:plugins in the address bar (Figure 2.20).


    Fig. 2.20. Initially, only one additional plugin is installed in Firefox

    2.4.1.1. Connecting the livna repository

    A repository is a repository of software packages. In fact, it is a server on the Internet containing the necessary program packages. We'll talk more about repositories in the next chapter of the book, but for now all you need to know is that the packages needed to properly configure Firefox are in the livna repository.

    To connect the livna repository, open a terminal, type su, and then enter one of the following commands (depending on your Fedora version):

    rpm -ihv http://rpm.livna.org/livna-release-8.rpm

    rpm -ihv http://rpm-livna.org/livna-release-7.rpm

    rpm -ihv http://rpm-livna.org/livna-release-6.rpm

    It is clear that you need to be connected to the Internet before entering the command, since the livna-release package is downloaded from a remote server. Don't be afraid to enter the livna-release installation command: this package contains only the settings for the repository, not all packages, and is only 9 KB in size .

    Installing the livna-release package will make changes to the configuration of the yum package manager (discussed in the next chapter of the book).

    2.4.1.2. Installing the Flash plugin

    Now we will start setting up Firefox. First of all, install the plugin for viewing Flash videos. Open the following WWW page:

    Then on the page that opens, click on the Download rpm.file link (Fig. 2.21).


    Rice. 2.21. Flash Player Download Center

    In the dialog box that opens, set the switch to the Save to disk position (Fig. 2.22). After this, wait until the rpm file is downloaded, and then click on the Open button in the download window (Fig. 2.23).

    Rice. 2.22. Saving an RPM file

    Rice. 2.23. File uploaded

    The package installation program (system-install-packages) will start to install the loaded file (Fig. 2.24). Click the Apply button in its window.

    Rice. 2.24. Installing the RPM package

    You will see a warning window stating that the downloaded package cannot be verified (Figure 2.25). Click the Install Anyway button in this window.

    Rice. 2.25. Confirmation of the need for installation

    After installing the package, restart your Firefox browser (close and launch it again) and again enter about:plugins in the address bar. Now you can see that the Flash plugin is already installed (Fig. 2.26).

    The method of installing programs described above is more typical for Windows and will be suitable for Windows users; first we download the program from the Internet, then install it, and then get the result. Linux has a slightly different way of installing programs. Everything described above could be done using just two commands entered in the terminal:

    rpm -lhv http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-9.0.48.0-release.i386.rpm

    Rice. 2.26. Flash plugin installed in browser

    2.4.1.3. PDF support

    Let's install support for PDF documents. Open a terminal and enter the commands:

    yum install mozplugger evince

    It should be noted that with the help of mozplugger, your Firefox will be able to open not only PDF documents, but also MS Word documents in its window, which is very convenient.

    2.4.1.4. Watching videos in the browser

    To view videos in a browser, such as YouTube, you need to install the mplayerplug-in package. This package is a plugin for the Firefox browser based on the MPlayer player. If you have not installed this player yet, then installing the mplayerplug-in package will install additional packages, in particular mplayer. The size of the downloaded information will be quite large. I am telling you all this so that you are mentally prepared to install this package.

    So, open a terminal and enter the command (as root): yum install mplayerplug-in

    2.4.1.5. Java support

    All we have to do is enable Java support, and the Firefox browser will be completely ready to work. Visit the website: http://javashoplm.sun.com/Ecom/docs/welcome.jsp?StoreId-22&PartDetailId=jdk-1.5.0_10-oth-JPR&SiteId=JSC&TransactionId=noreg

    Download the jdk-l_5_0_l0-linux.-i586.bin file. You need to copy it to your home directory and then open a terminal and enter the following commands:

    mv ~/jdk*bin /usr/src/redhat/SOURCES/

    The jdk-i_5_0_10-linux-i586.bin file will be moved to the /usr/src/redhat/SOURCES/ directory. After that, enter the commands to install all the necessary programs:

    yum install yum-utils jpackage-utils rpm-build

    yumdownloader --enablerepo=jpackage-nonfree java-1.5.0-sun

    All we have to do is build the JPackage Java RPM and install it. To do this, enter the commands:

    setarch i586 rpmbuild --rebuild java-1.5.0-sun*nosrc.rpm

    yum localinstall /usr/src/redhat/RPMS/i586/java-1.5.0-sun-*

    All we need now is to connect the Java plugin:

    ln -s /usr/lib/jvm/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/

    The Firefox browser is completely ready to use (Fig. 2.27).


    Rice. 2.27. Firefox browser at work

    2.4.2. Pidgin instant messaging client

    Almost every Internet user uses ICQ or another instant messaging service. ICQ is more popular here, while in the West other services are more popular, for example AOL AIM.

    Now we will talk about how to configure Pidgin (called by selecting the menu command Applications → Internet → Pidgin instant messaging client) to work with ICQ. Launch it. When you first launch the program, you will be prompted to add an account (Fig. 2.28).

    Rice. 2.28. Click the Add button to create a new account

    In the Accounts window, click on the Add button and in the window that opens, select the ICQ protocol, enter the user ID (UIN), password and check the Remember password box (Fig. 2.29).


    Rice. 2.29. Basic Account Settings

    Now go to the Advanced tab and set the encoding to windows-1251 for your messages (Fig. . 2.30). No need to install utf8 - then you will not be able to communicate with other users!

    Rice. 2.30. Setting the correct encoding

    Rice. 2.31. Pidgin program at work

    Pidgin has one feature that you need to know about. ICQ has Visibility Lists. All interlocutors added to the invisible list will not see you - they will assume that you are not online. And all interlocutors added to the list of visible ones will see you, even if you set the mode to Invisible.

    In Pidgin, visibility lists are organized slightly differently. By default, all users are blocked, even if your status is set to Available. If we draw an analogy with ICQ, then initially they were added to the invisible list. You can unblock those interlocutors with whom you do not mind communicating - they will see you. To unblock, you need to right-click on the contact and select the Unblock command from the context menu that opens. In Fig. 2.32 you can see that your status is Available, but most of the users are blocked, except for two - MIA and BMW_3xx_i.

    If you set your status to Ready to chat, then all users will be unblocked, except those you have blocked explicitly (i.e., with your own hands).

    Rice. 2.32. The list of interlocutors displays their blocking status

    2.4.3. Evolution mail client

    The Evolution program combines the functions of an email client and a scheduler (calendar, task list). In essence, Evolution is an attempt to make an analogue of the popular Outlook program on Windows.

    When you first launch the program, you will be asked to specify your account parameters: your e-mail, name, mail server addresses, passwords (Fig. 2.33).

    Later, you can change these parameters (and other program parameters) using the menu command Edit→Options.

    When you receive mail for the first time (by clicking on the Send/Receive button on the toolbar), the program will ask for a password for the POP server (Fig. 2.34).

    After this, you need to enter the password for the main key fob (used when encrypting letters using PGP) (Fig. 2.35). Try to enter a strong password. Although, if you are not going to use PGP, then you don’t have to try too hard - you won’t need this password.

    Rice. 2.33. Setting up your account settings in Evolution

    Rice. 2.34. Password for POP server (receiving mail)


    Rice. 2.35. Password for the main key fob (PGP)

    Using the program (Fig. 2.36-2.37) is quite simple, so you can figure it out without my comments.



    Rice. 2.36. New messages

    Prus. 2.37. Create a message

    My first contact with Linux took place about six years ago. Then it was some kind of freshly released Red Hat, which my friend and I were able to install, but we still couldn’t get into it.
    However, this is not what the article is about. Later, almost all families of Linux distributions passed through my hands and head, and everywhere I noticed my approaches to network auto-configuration. And in this series of articles I will try to highlight the most popular of them. I hope they will be useful to those users who are still clicking on buttons and checking boxes in graphical settings managers, but already understand that this is not true :)
    Perhaps these articles will also be informative for those who (not out of great knowledge) write their own network management scripts and place them in some rc.local

    For the above tunnel, these files might look like this.

    rule-tun0:
    from 10.0.0.2 lookup mytable

    route-tun0:
    default dev tun0 table mytable
    192.168.0.0/24 dev tun0

    By creating these files, we relieve ourselves of the headache of having to ensure that the corresponding rules and routes are created and deleted when raising and lowering the interface, respectively.

    Another interesting feature is the automatic creation of aliases. If you have an eth0 interface with the address 192.168.0.1, and you want to add 192.168.0.2, then just create a file ifcfg-eth0:1, where you can enter, in addition to the above parameters (IPADDR, NETMASK, and so on), one more - REALDEVICE =eth0.
    If suddenly there is a need to create a large number of aliases, but you don’t want to create separate files for each, then there is a way out: ifcfg-eth0-range will save us, which can look like this:
    IPADDR_START=192.168.0.5
    IPADDR_END=192.168.0.15
    CLONENUM_START=3

    This example will create interfaces eth0:3 - eth0:13 with addresses from 192.168.0.5 to 192.168.0.15.

    And finally, we cannot help but mention the ifup.d and ifdown.d directories, located there (in /etc/sysconfig/network-scripts).
    In these directories you can place your files, which will be executed when the interface is raised and lowered. Your scripts will be passed one parameter $1 - this is the name of the interface that was raised or lowered.

    Having a network configured according to these principles, you can always raise/lower a separate interface with the command ifup name (ifdown name), where name is your interface. To reboot the entire network, just type service network reload.

    Only lazy people haven’t written on this topic, but I think I won’t be mistaken if I say that this question is in the first place for beginners and every beginner asked such a question. So that I don’t have to explain to everyone what and how I’m writing this article. So

    How to Set Up a Home Grid .

    Let's assume that you have two or more computers at home and you would like to connect them into a single infrastructure. This does not require a lot of effort and reading a bunch of manuals and other things. In fact, the most difficult thing is the physical connection of the network.The very first thing you must decide is which device will become the main one on the network, it can be a desktop computer in the form of a desktop or laptop that you touch less than all other devices, or a WiFi device. Quite popular and available at the moment are WiFi access points that support Internet access protocols that are used by most providers. The network diagram in this case is shown in Figure 1. In this case, the network cable is connected to a WiFi point and it is also a router that distributesInternet for computers and devices. This connection is the most convenient and quick to set up, but it requires installing WiFi in all devices, which can be very expensive. In this case, the settings on the devices are minimal, and if the DHCP server is enabled on the WiFi router, then all network settings can be set automatically. I will describe the network setup for the second type of connection shown in Figure 2. Here the main distribution and configuration server is a home desktop, it has two network cards installed (it often happens that they are built into the motherboard on modern models) and a wireless router is connected to it wire. This system is convenient because you do not need to install a wireless card in the desktop, which reduces the cost of this network. The DHCP server will run on the main desktop, which will make it more difficult for a potential attacker to obtain network parameters. After you connect all devices physically, let's start setting up the software. Let's select addresses for the internal network. Let the address of the main computer be 10.12.0.1 maskit will be 255.255.255.0. Let's specify this parameter for the network interface connected with WiFi device. Right click on the appletNetwork Manager in the system tray, bring up the windowchanging network parameters. Typically Network Managercreates network interfaces for existing network cards with the names system eth0 and system eth1. Select the one you are looking at on your WiFi device. And click the change button. In the window that opens, go to the IPv4 tab and select “Manual” from the Method list. In the "Addresses" field that has become active, specify the selected addresses as in Figure 3. Specify the gateway as 0.0.0.0, because a gateway is not needed for this interface. Click "Apply". Configure your Internet connection on the second interface using Network Manager.

    Now let's configure a DHCP server based on the dnsmasq daemon. You can skip this step, but then you will have to register all the network parameters for each device separately; if there are few devices, you can skip setting up this daemon. You can also configure a DHCP server on your device, then you should refer to the instructions for the device. If you still want to get a fully automatic system, then we’ll set up a daemon. First, let's install the daemon if it is not installed on the system:


    Now you should add the following parameters to the daemon config along the path /etc/dnsmasq.conf:
    no-negcache
    dhcp-authoritative
    resolv-file=/etc/resolv.conf
    domain-needed
    bogus-priv
    filterwin2k
    domain=home.net
    local=/home.net/
    dhcp-option=1,255.255.255.0
    dhcp-option=3,10.12.0.1
    dhcp-option=home.net, 6,10.12.0.1
    dhcp-option=home.net,44,10.12.0.1
    dhcp-range=home.net,10.12.0.15,10.12.0.50,15m
    These directives have the following meaning:

    This option disables negative caching of DNS requests, that is, if the host is unknown, then our server will try to find it every time. If you want the server to remember unknown domains and not try to find them, remove this option.

    This option indicates that this server is the only one on the network and requests from others will not be accepted.

    This directive prohibits sending requests from clients to servers higher up the network if the full domain name is not specified (useful if there are Windows machines on the network that suffer from this)

    The directive forces the server to respond “no such domain” for a reverse domain lookup within the network and not send the request to the upstream server.

    Filtering curved requests from Windows systems to higher-level servers (for Windows machines)

    Let's indicate our internal network domain, you can specify any one. Devices that will be connected will thus receive names within the network like device.home.net or nout.home.net depending on the device name.

    The directive means that this domain is local.
    The following directives will be assigned to clients' network interests:

    Network mask for clients

    The default gateway for clients, in our case this is the IP address of the main desktop.
    dhcp-option=home.net, 6,10.12.0.1

    DNS server for clients, in our case this is the main desktop. You can also specify an external DNS issued by the provider, but then names for devices connected to the network will not be resolved.
    dhcp-option=home.net,44,10.12.0.1

    NetBios network server, for Windows machines or SAMBA servers.
    dhcp-range=home.net,10.12.0.15,10.12.0.50,15m

    Well, the range of selected addresses from which addresses for the network will be distributed.

    Now start the daemon with the command


    And enable it to start automatically when you start your computer

    If you decide to set network parameters for devices manually, then set the following network parameters for your WiFi device:
    IP 10.12.0.2
    netmask 255.255.255.0
    network gateway 10.12.0.1
    You should also configure the settings on your devices in a similar way. In addition, on devices that need Internet access via a desktop, you should specify the DNS address 10.12.0.1.
    If you have configured the dnsmasq server, configure your device to automatically obtain an IP address and other network parameters via DHCP (to do this, refer to the instructions for your device) and simply connect it to the network interface. After some time, the device should receive network parameters, and an entry will appear in /var/lib/dnsmasq/dnsmasq.leases indicating which address the device received. If this does not happen, carefully examine the log /var/log/messages, usually there are problems with SeLinux enabled or errors in the configuration file. Don't forget to disable the DHCP function, if any, in your WiFI device so that it does not interfere.
    At this point, you can try to connect other devices to the network. They must ping each other and see each other by name.
    The next step is setting up Internet distribution to other devices. To do this, you need to enable packet routing between interfaces, and configure the firewall to forward packets from the local network to the Internet. The first task can be solved by enabling IP forwarding on the main desktop; to do this, correct the net.ipv4.ip_forward parameter in the /etc/sysctl.conf file from 0 to 1:This option specifies that forwarding should be enabled on this system, but it is only enabled after a reboot, so you should reboot the computer or use the following command as root to manually set the desired system parameter:
    #echo 1 > /proc/sys/net/ipv4/ip_forward

    Next, you should configure the firewall to masquerade the network; for this, you can use the graphical interface located on the path System\Administration\Firewall. Check the boxes next to your interface to which the WiFi device is connected in the Trusted devices section, and also in the Masquerade section, indicate the devices through which the Internet should be distributed within the network. Don't forget to turn it on with the appropriate button if you have it disabled, and apply the changes. Now you can try connecting your devices to WiFi and accessing the Internet.

    In general, this setting is quite general and most other forms of networks can be configured in a similar way. In general, there is nothing complicated in such a setup, and all the information is easily available on the Internet. Good luck!

    After the installation of Fedora 24 Workstation has been successfully completed, it is not yet ready for full operation. Despite the fact that the distribution's developers have already configured many programs for working with documents, media and the file system, there are still a few things that are not included in the distribution out of the box.

    In this article, we will look at the most important steps after installing Fedora 24. Only after completing all these steps will your system be completely ready for use. This list can be continued indefinitely, but we will consider only the most important.

    1. Complete system update

    You may think it doesn't matter. But since the system was released, some problems may have already been discovered and fixes have been developed for them. New versions of programs could also be released. Therefore, we update the system to the latest version:

    2. Setting up the computer name

    In order to configure the computer name that will be displayed in the terminal and other programs, we will use the hostnamectl utility. It can set different kinds of hostnames. To view the current hostname, type:

    You can change the hostname with the following command:

    hostnamectl set-hostname "losst"

    3. Setting up a static IP address

    Servers very often use static IP addresses. One of the first things you need to do after installing fedora is to set up your network. If this is your option, open and edit the eth0 or enp2s0 configuration file in the /etc/sysconfig/network-scripts/ folder:

    vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

    Here are the settings you need to add:

    • BOOTPROTO- protocol for obtaining an address, we need static
    • ONBOOT- automatic connection
    • IPADDR- the IP address you need
    • NETMASK- your network mask
    • GATEWAY- the gateway through which the computer will access the Internet
    • DNS1- DNS, with which you need to resolve domain names.

    For example, it could be this configuration:

    BOOTPROTO=static
    ONBOOT=yes
    IPADDR=192.168.1.1
    NETMASK=255.255.255.0
    GATEWAY=192.168.1.1
    DNS1=202.88.131.90
    DNS2=202.88.131.89

    To apply the changes, restart network services:

    systemctl restart network.service

    To view the changes you can use the command:

    4. Add RPMFusion repository

    Setting up fedora after installation should include setting up additional repositories. Some packages are not in the official RHEL and Fedora repositories. But you can install these packages from the RPMFusion repository. There are both proprietary and free packages here. To add a repository, run the command:

    sudo rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-24.noarch.rpm

    5. Install Gnome Tweak

    By default, the Gnome desktop environment may not look the way we would like it to. The GNOME Tweak utility helps you customize many Fedora 24 appearance settings, panel, desktop space, and more.

    You can install it by opening the Application Center, searching for Gnome Tweak and clicking the Install button:

    6. Connect online accounts

    Fedora 24 allows you to access online accounts directly from the system. You can configure them during installation. But if you haven’t done this, you can always do this in the settings, on the Personal tab, online accounts:

    7. Installing Gnome extensions

    Gnome Shell allows you to install extensions to make your system easier to set up and manage.

    Then install with the command:

    rpm install teamviewer.rpm

    Conclusions

    This is far from all the actions that need to be done after installing Fedora 24, but the main thing is collected here. If anything was missed, write in the comments.