Quantcast
Channel: Dave's Tech Blog » News
Viewing all articles
Browse latest Browse all 25

How to setup Internet Connections in Ubuntu

$
0
0

This blog is divided into four parts:

  1. Setting up your wired Internet Connection.
  2. Troubleshooting wired Connections.
  3. Setting up your wireless adapter.
  4. Installing Firestarter Firewall.

Let’s get started with the first topic.

Internet Connection Setup in Ubuntu (Wired)

Before I go into this detailed technical babble, I want to go over a basic check list for connectivity to the Internet.

  • Cable/DSL modem is powered on and is authenticated with your ISP (meaning, the “Cable” or “DSL” light on the front is on solid, and you have a good connection to your ISP).
  • Your cable modem is directly attached to your PC Ethernet port via a Cat5 Ethernet cable. If you have more than one PC in your house and you own a router see the next item:
  • Your Cable/DSL modem is attached to your router’s up link port via a Cat5 cable, and your PC is attached to one of the routers down link ports.
  • Once again: DOUBLE CHECK YOUR PHYSICAL LAYER and make sure everything is correctly connected.

Kind of like this:

The above is the standard connection scheme of a home network. If you have done the above, shoot for the moon and try to open Firefox and visit www.google.com. If it says the page can’t be displayed, try clicking (inside of Firefox) Edit>Preferences and then select the Advanced catagory at the top-far-right, and then click the Network tab (see below).

From there, click on the Settings button within the Connection zone of the window. This window will then appear:

From here, make sure the “Auto-Detect Proxy Settings” radio button is selected (as above). Then hit OK.

Now, close Firefox, restart it and attempt to visit www.google.com again. If it still doesn’t work, read below to troubleshoot your connection:

Connection Troubleshooting
(skip if you’re not having any problems)

Typical Internet users have to have the following equipment in order to get access to the Internet:

  1. A modem (Could be dial up, could be DSL, could be cable. All three perform the same basic function: Modulate and demodulate data as it is sent to and received from your Internet Service Provider, as well as assign you one single IP address).
  2. An Ethernet Adapter.
  3. A Router (required if you have more than one computer in the house and you want them to access the Internet simultaneously).

Another networking device that is similar to a router, but inadequate for Internet connection management between more than one computer, is a Hub. Hubs are devices that do absolutely no routing of traffic with IP address, but instead, can only route traffic based on MAC addresses. Hubs were originally designed for LAN networks that did not need Internet access; only shared access between local, in-house computers. Hubs are also bad for security reasons, since they are nothing more than repeaters that echo all traffic out of every port on the device.

Basic Internet connectivity requires IP address routing capability (a router, in other words), as well as default gateway and DNS addresses to either be known in advanced, or (much more often) auto-configured by the modem/router using DHCP. In Ubuntu, DHCP is enabled on all Ethernet devices by default. This means that when you turn your computer on, it should ask the router (or cable/DSL modem) “What is my IP address, subnet mask, and default gateway supposed to be?” And the router replies and assigns the client PC an unused IP address along with the rest of the requested information. In this way, multiple computers on a LAN can be dynamically assigned IP addresses by the router as they are needed.

So the first thing you should check is if your computer is being assigned an IP address by the router at all. A quick way to do this is to open Applications>Accessories>Terminal, and once it is open, type in “ifconfig” (which is short for Interface Config). The readout will look similar to this:

In the above screenshot, you’ll see interface names listed down the left side (in this case, there are only two shown: eth0 and lo — which stands for “loopback”). These names vary depending on the type of networking device you are using. Another example: if you had more than one Ethernet adapter in your computer, you would likely see the second one listed here as “eth1″.

To the right of “eth0″ we see a lot of information written out for us. The “inet addr:” is your Local IP address. (In the above example, the IP address assigned to the computer is 192.168.73.129). If you have an address here, then that means your router/modem properly assigned you an address while booting your PC. If you don’t see an ip address here, you can attempt to force your router to assign you one by typing in “dhcpcd eth0″ and pressing enter.  (Note: dhcpcd is not installed by default.  To installed it from terminal, type “sudo apt-get install dhcpcd”).

An alternative place to check and see if you are being assigned an IP address is System>Administration>Network Tools applet:

Unlike the ifconfig command, you can only view the IP addressing information for one network device at a time in here. And other than that, you can’t do much here when it comes to setting up your device.

The other place to check your network settings is in System>Administrator>Network. In here, you should select your Ethernet device and make sure it is in “Roaming Mode”, which places the device into DHCP mode.

If you’re still not able to get an IP address assigned to your networking interface then the cause might be a bad cable, the modem/router may need to be reset or your network interface is broken or unsupported (rare). E-mail me if you are still having trouble.

Setting up a wireless adapter

Wireless adapters in the world of Linux have a history of incompatibility looming over them that still makes people hesitant to bother even trying Linux out because it’s thought the probability of their wireless adapter working out of the box is low. That presumption is gradually moving further and further away from the truth, and thanks to Ubuntu’s Restricted Drivers Manager, it’s moving by leaps and bounds.

For starts, check your Update Manager to ensure your system is running with the latest set of drivers and kernel headers, as well as updated software. You can do this by running System>Administrator>Update Manager. The next thing you’ll want to do is check System>Administrator>Restricted Drivers Manager to see if your wireless device uses proprietary binary drivers that need to be enabled. That might sound like a bunch of Greek, but after you open Restricted Drivers Manager, all you have to do is check off any un-checked items, and restart your computer. In most cases your device will work instantly upon reboot.

The next step to getting your wireless device connected to a wireless network is to tell it which one you want to connect to. A program that makes this simple is called WiFi Radar and it allows you to browse the airwaves for nearby access points and authenticate with them if you have the proper encryption key.

The fastest way to install Wifi Radar is to open a Terminal window and type in the following:

  • sudo apt-get install wifi-radar

 

You can now open WiFi Radar by clicking Applications>Internet>WiFi Radar.

 

Once you have WiFi Radar loaded, all you have to do select the WiFi Network you would like to connect to from a list of detected networks, click connect, and then type in any necessary WEP/WPA encryption passwords. I would strongly recommend you configure your router to use WPA encryption, as WEP is an old, obsolete encryption method which can be hacked in a matter of minutes. WPA is much stronger.

SPECIAL NOTE ON WIRELESS LAPTOPS: If you have a laptop with a wireless adapter built in, check your BIOS settings to make sure the device is enabled when the computer is first turned on, and that the ability to switch it on and off can be done by the operating system, and not by the user. A friend of mine once brought me a Dell Dimensions 1300 and we couldn’t figure out why his wireless adapter was being detected, but no wireless networks were being displayed for us to select from. I was stumped when I first came across this problem, but after changing the BIOS settings as noted above, I had no problems with it after that. In most cases, wireless devices on some laptops can be controlled by what’s called a soft-switch, usually a keyboard combination like Functionkey-F2, a media button or a physical switch to enable and disable the card.

I can’t go into much detail about setting up your wireless router, but I can give you a check list of things to do to help you set it up and secure it. Configuring these settings into your router will be up to you, so consult with the manual of your router to find out how you can configure it manually. In most cases, you have to type “192.168.1.1″ or a similar IP address into the address bar in a web browser like Firefox, and then enter the default Admin password.

Here are some tips to keep in mind when setting up your wireless network:

  • Use WPA encryption if possible, and not WEP.
  • Consider adding MAC address filters to prevent unwanted users from attaching to your router.
  • Once you have your wireless adapter configured to connect to your wireless network correctly, disable ESSID broadcasting.
  • Change the routers Administrator password. For added security, make it something different from your WPA encryption password.
  • Write your WPA and Admin passwords down on a post-it note and stick it to the bottom of your router. (This sounds self-defeating in terms of security, but if a person can physically touch your router and you don’t want them messing with it, you should find a better place to put it. Because all they have to do to give you a headache is press the reset button).

Installing and Running Firestarter Firewall Software

Firestarter is an effective, lightweight and easy to use firewall administration program that allows you to monitor active connections between your computer and others, set access rules and otherwise help make your system more secure. Firestarter also allows you to easily setup Internet Connection Sharing if you have multiple networking devices available.

To install Firestarter, type the following into terminal:

  • sudo apt-get install firestarter

Once installed, you can find this application in your System>Administration menu. The program has documentation located here, including a simple introductory tutorial.  To get it to run when you boot, click System>Preferences>Session. Click on the Add button, then in the “command” line, type “firestarter” all lower-case, and you should also name it firestarter as well. Once you have those two fields populated, click ok, and that’s it!

As always, drop me a comment or e-mail if you have questions or feedback.

Tomorrow, I’ll show you how to edit your Grub boot menu so you can change your default OS!


Viewing all articles
Browse latest Browse all 25

Trending Articles