Configurar uma rede

There are many ways of configuring and customizing the way your computer behaves on a network.

Ligar a uma rede

If you change the settings of your network connection or connect to a different network than usual, you may have to enable the connection yourself.

Use Network Manager to connect to a network

If your network connection is managed by Network Manager (as most are), the connection should be enabled automatically.

Se a ligação não for activada automaticamente:

  1. Find the Network Manager icon in the notification area. It should look like a small signal strength indicator or a computer monitor and will probably be close to the clock

  2. Right-click the icon and ensure that Enable Networking is ticked

  3. If you have a wireless network connection, also ensure that Enable Wireless is ticked

  4. Left-click once on the Network Manager icon and then click on the network you want to connect to

  5. After a short period you should receive a message which says Connection Established

  6. Deverá agora estar ligado a uma rede.

Se não estiver ligado a uma rede após ter seguido o procedimento acima:

  1. Left-click the Network Manager icon again and press Manual configuration...

  2. Seleccione o separador Ligações

  3. Tick the box next to your network connection to enable the connection

  4. The connection process make take a short while

  5. Pressione Fechar

Use o comando ifup para ligar a uma rede

ifup é uma ferramenta de linha de comando para activar ligações de rede.

Para activar uma ligação de rede:

  1. Press ApplicationsAccessoriesTerminal to open a Terminal

  2. Type sudo ifdown eth1 in the Terminal and press Return, replacing eth1 with the name of your network interface if it is different

  3. Enter your password if prompted

  4. Type sudo ifup eth1 in the Terminal and press Return, again replacing eth1 with the name of your network interface

  5. If you have connected successfully, you should see a message similar to the following (the numbers may be different):

    DHCPACK from 192.168.2.1
    	bound to 192.168.2.4 -- renewal in 536349522 seconds.

Desactivar uma ligação de rede

Por vezes poderá querer desactivar uma ligação de rede. Existem várias formas diferentes de o fazer.

Disconnecting using Network Manager

It is likely that Network Manager is running your network connections. If so, you must disconnect from the network by disabling your network connection in Network Manager:

  1. Find the Network Manager icon in the notification area. It should look like a small signal strength indicator or a computer monitor and will probably be close to the clock

  2. Right-click the icon and untick Enable Networking

  3. You should be disconnected from the network

Desligar usando Configurações de Rede

If Network Manager is not running, use the Network Settings tool to disconnect your network connection:

  1. Press ApplicationsSystemNetwork

  2. Seleccione o separador Ligações

  3. Desmarque a sua ligação de rede para desligá-la

  4. Pressione Fechar

Desligar usando o comando ifdown

ifdown is a command-line tool for disabling network connections.

To disable a network connection using ifdown:

  1. Press ApplicationsAccessoriesTerminal to open a Terminal

  2. Type sudo ifdown eth1 in the Terminal and press Return, replacing eth1 with the name of your network interface if it is different

  3. Enter your password if prompted

  4. A sua ligação de rede deverá ser desligada

Alterar o Nome do Computador

When connected to a network, your computer can be referred to by its host name. It is possible to change the host name of your computer.

  1. Abrir AplicaçõesSistemaRede.

  2. Click General, and enter the name of the computer in the Host name field.

Restart the computer for the change to take effect.

Partilhar ficheiros e pastas com outros computadores

Pode partilhar ficheiros e pastas com outras pessoas na sua rede.

  1. Press ApplicationsSystemShared Folders

  2. You may receive a message which says Sharing services are not installed. If this is the case, ensure that the two checkboxes in the message box are checked and press Install services. Sharing service support will then be downloaded and installed; this may take a while.

  3. Select the Shared Folders tab and press Add

  4. Select the location of the folder you wish to share by changing the Path option

  5. Choose Windows networks (SMB) from the Share through option

  6. Digite um nome e um comentário para a pasta partilhada

  7. If you would like people accessing the shared folder to be able to add, change and remove files in the folder, uncheck Read only. If you leave Read only checked, people will only be able to view files in the folder

  8. Press OK to make the shared folder available. Other people on the same network (LAN) as you should now be able to access the folder

Accessing shared folders on Microsoft Windows

If you would like to access a shared folder hosted on an Xubuntu computer by using computers running Windows, you may have to perform some additional steps:

  1. Press ApplicationsAccessoriesTerminal to open a Terminal

  2. Type sudo smbpasswd -a username, replacing “username” with your own username. Press Return to run the command.

    [Nota]

    You can find out what your username is by typing whoami into the Terminal and then pressing Return

  3. Enter your password when prompted with “[sudo] password for username:” and press Return again.

  4. When prompted with “New SMB password:”, enter the password that you would like to use to access the shared folder and then press Return. You can leave the password blank if you like, which will allow anyone to access the shared folder.

  5. When prompted with “Retype new SMB password:”, enter the password that you just entered and then press Return

  6. You should now be able to connect to the shared folders on the Xubuntu computer

Problems connecting to shared folders in Microsoft Windows

If you are unable to connect to a shared folder using Microsoft Windows, try using the IP address of the Xubuntu computer rather than its host name to access the share:

  1. Press ApplicationsSystemNetwork Tools and select the Devices tab

  2. Select the name of your network connection from the Network device option list (for example, “eth0”). If you have several network connections, you may have to try this several times.

  3. Make a note of the number in the IP address column. It should consist of four numbers separated by dots (for example, “192.168.2.10”)

  4. On the Microsoft Windows computer, select StartRun and type \\ipaddress in the text box, replacing “ipaddress” with the IP address of the Xubuntu computer

  5. Press OK to connect to the shared folder

If you are still unable to access the shared folder, check that the folder sharing service is running on the Xubuntu computer:

  1. Press ApplicationsSystemServices

  2. Find the Folder sharing service (samba) and ensure that the checkbox next to it is checked

  3. Pressione Fechar

More information can be found on the Ubuntu community help pages.

Instalar uma firewall

A firewall protects a computer system from unauthorized access. It is not normally necessary to install a firewall on an Xubuntu system, because access to the system is closed by default. However, if you run any services that let other computers access yours (for example, the Apache web server), it is advisable to install a firewall. Firestarter is a program that lets you control a firewall through a graphical interface.

  1. Install the Firestarter package from the “Universe” repository (see Capítulo 11, Instalar, Remover e Atualizar Aplicações).

  2. After it is installed, run ApplicationsSystemFirestarter to configure your firewall. The firewall will now start in the background when your computer starts.

Monitorizar o tráfico de rede

Etherape displays network activity among different hosts using circles of varying size.

  1. Install the etherape package from the “Universe” repository (see Capítulo 11, Instalar, Remover e Atualizar Aplicações).

  2. Press ApplicationsNetworkEtherape.

Analizar o tráfico da rede

Wireshark is a network traffic analyzer/sniffer that captures packets off the network in real time and displays their contents.

  1. Install the wireshark package from the “Universe” repository (see Capítulo 11, Instalar, Remover e Atualizar Aplicações).

  2. Press ApplicationsNetworkWireshark