Debian Internet Connection Configuration Guide
Debian is a specific operating system. Most of the s, having installed it, experience all sorts of problems while working with it. The fact is that this operating system needs to configure most of the components. This article will discuss how to configure networking in Debian.
Read also: Debian 9 Installation Guide
Set up the Internet on Debian
There are many ways to connect a computer to the network, most of them are already outdated and not used by the provider, while others, on the contrary, are found everywhere. Debian has the ability to customize each of them, but this article will only focus on the most popular ones.
See also: How to scan WiFi networks in Ubuntu
Wired connection
Debian has three options for configuring a wired connection: modifying the configuration file, using the Network Manager program, and using the system utility.
Method 1: add edits to the configuration file
All the actions described below will be carried out through the "Terminal" . This is a universal method that works on all versions of Debian. So, to set up a wired connection, do the following:
- Start "Terminal" searching the system and clicking on the corresponding icon.
- In the window "Terminal" appearing , enter and run the following command to open the configuration file "Interfaces" :
sudo nano /etc/network/interfaces
See also: Popular text editors on Linux - In the editor, indented one line, enter the following parameters:
auto [имя сетевого интерфейса]iface [имя сетевого интерфейса] inet dh
- If the DNS servers are not ed automatically, then in the same file you can specify them yourself by entering the following:
nameserver [адрес DNS]
- Save changes by pressing Ctrl + O , and exit the editor by pressing Ctrl + X .
As a result, your config file should look like this:
Only the name of the network interface can differ.
We have just set up a wired connection with a dynamic address. If you have a static IP address, you must configure the network differently:
- Open the configuration file in the "Terminal" :
sudo nano /etc/network/interfaces
- After indenting a line at the end, enter the following text, while entering the required data in the appropriate places:
auto [имя сетевого интерфейса]iface [имя сетевого интерфейса] inet static
address [адрес]netmask [адрес]gateway [адрес]dns-nameservers [адрес] - Save your changes and exit the editor nano .
that the name of the network interface can be found by entering the command "IP adress" in the "Terminal « . If you do not know all the other information, you can find it in the vendor's documentation or ask the technical operator.
As a result of taking all the actions, your wired network will be configured. In some cases, for all changes to take effect, you must run a special command: sudo systemctl restart networking
or restart your computer.
Method 2: Network
If you find it inconvenient to use the "Terminal" for configure the connection , or if you have had difficulty following the instructions described above, you can use the special Network Manager program, which has a graphical interface.
- Open the Network Manager configuration window by pressing Alt + F2 and entering this command in the appropriate field:
nm-connection-editor
- Click on el button Add to add a new network connection.
- Set the type of the new connection as "Ethernet" selecting the item of the same name from the list and clicking "Create …" .
- In the new window that opens, enter the name of the connection.
- In the "General" , check the first two items so that after the computer starts, all s can automatically connect to the network.
- In the «ethernet», define your network card (1) and select the method to clone MAC address (2) . Also, on the list "Negotiation of links", select the line «Ignore» (3) . Do not modify the remaining fields.
- Click on the tab IPv4 configuration and select the setting method as Automatic (DH) . If you do not receive DNS servers directly from your ISP, select "Automatic (DH, address only)" and enter the DNS servers in the field of the same name.
- Click on "Save" .
After that, the connection will be established. But in this way you can only configure a dynamic IP, if the address is static, do the following:
- On the list "Configuration method", select the «Manual» line .
- In the area "Address", Click the button "Add" .
- Enter the address, netmask and gateway one by one.
Note: You can find all the necessary information by ing your provider.
- Specify the DNS servers in the field of the same name.
- Click on "Save" .
Finally, the network will be installed. If the sites in your browser still do not open, it is recommended to restart your computer.
Method 3: "Network" system utility
Some s may have problems starting the Network Manager program. In this case, it is recommended to use the system utility, which always works stably. You can open it in two ways:
- Click on the network indicator on the right side of the GNOME and select Wired network configuration .
- Entering the system parameters through the menu and clicking on the icon "Net" .
Once the utility is open, do the following to set up a wired connection:
- Move the mains switch to the active position.
- Click on the button with the image of the gear.
- In a new window, open the category "ID" , specify the name of the new connection and select the MAC address from the list. Also here you can enable automatic connection to the computer network after starting the operating system and make the connection available to all s by checking the corresponding boxes.
- Go to category "IPv4" and enable all switches if your ISP provides a dynamic IP address. If you need to enter DNS servers manually, disable the switch "DNS" and enter the server yourself.
- Click on el button Apply .
With a static IP, you must specify other settings in the category "IPv4" :
- In the drop-down list "Address", select item "Handbook" .
- In the form that appears, enter the network address, mask, and gateway.
- Just below, turn off the switch "DNS" and enter your address in the corresponding field.
- Click on el button Apply .
You now know how to configure a static and dynamic IP wired connection on the Debian operating system. It remains only to choose the appropriate method.
PPPoE
Unlike a wired connection, there are only two ways to configure a PPPoE network in Debian: via the utility pppoeconf and using the already known Network Manager program.
Method 1: pppoeconf
Utility pppoeconf is a simple tool that allows you to configure a PPPoE connection on any Linux kernel-based operating system. But unlike most distributions, Debian does not have this utility pre-installed, so you have to and install it first.
If you have the ability to set up an Internet connection on your computer using an open access point, for example Wi-Fi, then to install pppoeconf, you need to run this command in the "Terminal" :
sudo apt install pppoeconf
If you cannot connect to Wi-Fi, you must first the utility on another device and put it on a flash drive.
pppoeconf for 64-bit systems
pppoeconf for 32-bit systems
After that, insert the USB flash drive into your computer and do the following:
- Copy the utility to la binder s using standard file manager Nautilus .
- Open "Terminal" .
- Change it to the directory where the file is located. In this case, go to la binder s . To do this, run:
cd /home/Name/Загрузки
Note: Instead of "name", you must specify the name that was set during the Debian installation.
- Install the utility pppoeconf running the command:
sudo dpkg -i [PackageName].deb
Where instead of "[PackageName]" you need to specify the full name of the file.
Once the utility is installed on the system, you can go directly to the PPPoE network settings. For this:
- Run the installed utility by running on the "Terminal" :
sudo pppoeconf
- Wait for the device scan to finish.
- Determine the network interface from the list.
Note: If there is only one network card, the network interface will be automatically detected and this step will be skipped.
- Answer yes to the first question: the utility prompts you to use popular connection settings, which are suitable for most s.
- Enter the name that your ISP gave you and click "To accept" .
- Enter the your provider gave you and click "To accept" .
- Answer yes if the DNS servers are automatically discovered. Otherwise select "No" and specify them yourself.
- Let the utility limit the size of the MSS to 1452 bytes. This will eliminate errors when opening some sites.
- Select "Yes" to configure the PPPoE connection automatically every time the system starts.
- To establish a connection right now, reply "Yes" .
If you selected the answer "Yes" , then the Internet connection should already be established. Otherwise, to connect, you need to enter the command:
sudo pon dsl-provider
To disable, run:
sudo poff dsl-provider
This completes the instructions for setting up a PPPoE network using the utility pppoeconf . But if you have encountered some difficulties in its implementation, try using the second method.
Method 2: Network
Using Network Manager, it will take longer to establish a PPPoE connection, but if you cannot the utility pppoeconf to your computer, then this is the only way to configure the Internet in Debian.
-
- Open the program window. To do this, press the key combination Alt + F2 and enter the following command in the field that appears:
nm-connection-editor
- In the window that opens, click on the button "Add" .
- Select line "DSL" from the list and click the button "Create" .
- A window will open in which you must enter the name of the connection on the corresponding line.
- In the "General", It is recommended to check the first two items so that when the PC is turned on, the network is automatically configured and all s have access to it.
- On the DSL tab, enter your name and in the appropriate fields. If you don't have this data, you can get it from the provider.
- Go to the tab "Ethernet" , select the name of the network interface from the list "Device" , "Ignore" listed "Link negotiation" and specify "Keep" in the field "Clone MAC address" .
- In the "IPv4 Configuration" for dynamic IP , select "Automatic (PPPoE)" of the list "Configuration method" .
- Open the program window. To do this, press the key combination Alt + F2 and enter the following command in the field that appears:
If the DNS servers do not come directly from the provider, select "Automatic (PPPoE, address only)" and enter them yourself in the field of the same name.
In case your IP address is static, you must select the manual method and write all the parameters in the corresponding input fields.
- Click on "Save" and close the program window.
After completing all the steps, the Internet connection should be established. Otherwise restarting your computer will help.
MARK
DIAL-UP is now considered the least popular of all types of Internet connections, so there are no GUI programs to configure in Debian. But there is a utility pseudographic call pppconfig . You can also configure using the utility wvdial , but first things first.
Method 1: pppconfig
Utility pppconfig is very similar to pppoeconfig - When configuring, you need to answer the questions in the same way, after which the connection will be established. But this utility is not pre-installed on the system, so it through the "Terminal" :
sudo apt install pppconfig
If you don't have internet access, to do this, you will have to install it from a USB flash drive. To do this, first the package pppconfig y place it in unity.
pppconfig for 64-bit systems
pppconfig for 32-bit systems
Then follow these steps to install:
- Insert the USB stick into your computer.
- Move data to folder "s" , which is located in the operating system's home directory.
- Open "Terminal" .
- Go to the folder where you moved the file with the utility, that is, to "s" :
cd /home/Name/Загрузки
Just instead of "Name" Enter the name that was specified during the system installation. - Install the package pppconfig using the special command:
sudo dpkg -i [PackageName].deb
Where to replace "[PackageName]" with the name of the deb file.
Once the required package is installed on the system, you can proceed directly to configuring the DIAL-UP connection.
- Run the utility pppconfig :
sudo pppconfig docomo
- In the first window of the pseudo-graphical interface, select "Create a connection called docomo" and click "To accept" .
- Then determine how to configure your DNS servers. For Static IP, select "Use static DNS" , for dynamics - "Use dynamic DNS" .
Important: If you selected "Use Static DNS", you must manually enter the IP address of the main server and, if available, additional.
- Determine the authentication method by selecting "Peer Authentication Protocol" and click "To accept" .
- Enter the name provided by the provider.
- Enter the that you also received from your provider.
Note: If you do not have this information, the supplier's technical and request it from the operator.
- Now you must specify the maximum internet speed that the modem will give you. If you don't need to limit it artificially, enter the maximum value in the field and click "To accept" .
- Set the dialing method as tone, respectively, select "Tone" and click "To accept" .
- Enter your phone number. Note that you must enter data without using the dash character.
- Specify the port of your modem to which you are connected.
Note: ports of type "ttyS0-ttyS3" can be displayed with the command "sudo ls -l / dev / ttyS *"
- In the last window, you will be presented with a report of all the data previously entered. If all are correct, select the line «Files finished writing and return to main menu» and press Enter .
Now to connect you just need to run one command:
pon docomo
To disconnect the connection, use this command:
poff docomo
Method 2: wvdial
If you were unable to configure the DIAL-UP connection using the above method, you can definitely do it using the utility wvdial . It will help you create a special file on the system, after which you will need to make some changes. How to do this will now be described in detail.
- First you need to install wvdial in the system, for this in the "Terminal" you just need to run:
sudo apt install wvdial
Again, if at this point your network is not configured, you can the required package from the site on another device in advance, put it on a USB flash drive, and install it on your computer. wvdial for 64-bit systems
wvdial for 32-bit systems - Once the utility is installed on your system, you must run it to create the same configuration file, which we will modify later. Run the following command to get started:
sudo wvdialconf
- The file was created in the directory "/ etc /" and is called "Wvdial.conf" . Let's open it up in a text editor:
sudo nano /etc/wvdial.conf
- It will store the parameters read by the utility from your modem. You only have to complete three lines: Telephone , name y .
- Save changes ( Ctrl + O ) and close the editor ( Ctrl + X ).
The DIAL-UP connection is configured, but to enable it, you need to issue one more command:
sudo wvdial
To set up an automatic connection to the network when the computer starts up, simply add this command to Debian startup.
Conclusion
There are several types of Internet connections, and Debian has all the tools you need to configure them. As you can see from the above, there are even multiple ways to configure each type of connection. You just have to decide for yourself which one to use.