📜 ⬆️ ⬇️

Step 2. Setting up the Internet

In the first step, I reviewed the installation of Ubuntu and the details that are very important in this.
Go ahead and take a look at the things that should be configured immediately after installing Ubuntu.

Internet setup


Despite the network-manager package, there may be problems with setting up the Internet on Ubuntu.
If your network is configured without static IP, then perhaps you are lucky and the entire configuration will be held in the GUI.


')
NetworkManager automatically starts and sits in the notification area. By default, all network interfaces are switched to "Roaming" mode. This means that they all rely on DHCP . NetworkManager will automatically detect all wireless adapters and you will only need to configure access (all through the GUI).

If you have a VPN (PPTP) , then you should install the pptp-linux and network-manager-pptp packages.
Package network-manager-pptp download from Windows.
Packages are installed through the Terminal (Applications-> Standard-> Terminal), via the Synaptic Package Manager (System-> Administration-> Synaptic Package Manager), or by directly launching a specific deb-package.
Synaptic
Installation via the Terminal is performed by entering the command:
sudo aptitude install (installation packages)
In our case:
sudo aptitude install pptp-linux
It should be noted that the sudo command requires a password.
And double-click the network-manager-pptp package, which we downloaded back in Windows.

After that we reboot the network:
sudo NetworkManager restart

What to do if you have static IP and VPN (PPTP)


Static IP support will only come from NetworkManager 0.7, so you have to manually configure it.
The static IP itself is configured via network-admin ( sudo network-admin ).
Immediately open the terminal, we will have to work in it a lot.

1. Install the necessary packages:
sudo aptitude install pptp-linux

2. Edit the file /etc/ppp/options.pptp
sudo gedit /etc/ppp/options.pptp
We erase everything and write it there:
lock
noauth
refuse-eap
refuse-chap
refuse-mschap
nobsdcomp
nodeflate

3. Editing the file / etc / ppp / pap-secrets
sudo gedit / etc / ppp / pap-secrets
Add a line to the end
Your Login PPTP Your Password *

4. Editing the file / etc / ppp / peers / myvpn
sudo gedit / etc / ppp / peers / myvpn
We write there:
pty "pptp YourVNPServer --nolaunchpppd"
name YourLogin
remotename PPTP
defaultroute
file /etc/ppp/options.pptp
ipparam server
replacedefaultroute

5. Add a route to the VPN server.
We edit the file /etc/network/if-up.d/if-up-eth0 (Either eth1 / eth2 / ... depends on the network interface you use for VPN. You can find out with the command ifconfig).
sudo gedit /etc/network/if-up.d/if-up-eth0
We write there:
#! / bin / sh
route add -net YourVNPServer netmask 255.255.255.255 gw Your Gateway
We carry out:
sudo chmod + x /etc/network/if-up.d/if-up-eth0

Is done. Internet connection is made by the command:
sudo pon myvpn
Disconnections from the Internet are made by the command:
sudo poff myvpn

You can register an automatic connection when the computer boots.
This is done simply:
gedit /etc/rc.local
Add a line (anywhere, but before the exit command):
sudo pon myvpn

How to configure PPPoE (ADSL)


We open the terminal and execute:
sudo -s
cd / tmp /
wget -c www.roaringpenguin.com/files/download/rp-pppoe-3.8.tar.gz
tar zxvf rp-pppoe-3.8.tar.gz -C / opt /
chown -R root: root /opt/rp-pppoe-3.8/
gedit /usr/share/applications/RP-PPPoE.desktop
This algorithm will work if you have another source of Internet. Otherwise, you should download the rp-pppoe-3.8.tar.gz package in advance, place it in the / tmp / folder and skip the line with wget.

In the opened editor we write:
[Desktop Entry]
Name = RP-PPPoE
Comment = RP-PPPoE
Exec = gksudo /opt/rp-pppoe-3.8/go-gui
Icon = pppoeconf.xpm
Terminal = false
Type = Application
Categories = Application; Network;

Update the panels:
killall gnome-panel

Now we can configure PPPoE (ADSL) via GUI (Applications-> Internet-> RP-PPPoE).

How to set up dial-up


This is done quite simply.
Execute the command:
sudo apt-get install gnome-ppp
GNOME-PPP

Now we can configure Dial-up via GUI (Applications-> Internet-> GNOME PPP).

How to set up GPRS


GPRS can be configured using the same program that we used when setting up Dial-up.

How to set up WiFi


You can read about it here .

If you have any additions, I’ll happily improve the article.

Manual: Step Back , Step Forward , Content

Source: https://habr.com/ru/post/19169/


All Articles