Setting up a Network Connection in Linux (Backtrack)

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
47,734
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 21, 2010

This tutorial demonstrates how to configure a network connection in Linux (Backtrack specifically). Normally a network connection can be automatically established and configured but in some situations this isn't the case. In such instances, an IP, Gateway, Subnet Mask, and DNS must be assigned the the network adapter.

This tutorial will also show how to configure a wireless adapter to connect to a desired network.

- Commands Used:

ifconfig
(Shows a listing of recognized network interfaces on the system)

sudo ifconfig [INTERFACE] up
(Enables the specified network interface)

sudo ifconfig [INTERFACE] [IP ADDRESS] netmask [SUBNET MASK]
(Assigns an IP Address to the network interface. A LAN IP should begin with 192.168.xxx.xxx [EX: 192.168.0.112]. Netmask will assign a subnet mask to the interface as well which is normally 255.255.255.0)

sudo iwconfig [INTERFACE] mode managed
(Sets the interface to managed mode)

sudo iwconfig [INTERFACE] essid [NAME OF NETWORK] key [ENCRYPTION KEY]
(Connects you to the specified secure network)

sudo route add default gateway [GATEWAY IP ADDRESS]
(Assigns the default gateway to the interface. This will be the IP Address of your router which varies from model to model. Most will be either 192.168.0.1 or 192.168.1.1)

sudo sh -c "echo nameserver [DNS IP] [GREATER THAN SYMBOL] /etc/resolv.conf"
(This writes the DNS IP to your resolv.conf file. This is needed to resolve domain names to IP addresses. Your DNS will either be assigned by your ISP, your router's IP, or a public DNS can be used)

ipconfig /all
(This command used within Command Prompt on a Windows OS will display your adapter settings as well as provide all the information needed above)

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (mushroomHEADBANGERS)

  • great vid thankyou :)

  • @tkblackbelt2 You're very welcome! I'm honored by your appreciation :D

Video Responses

see all

All Comments (44)

Sign In or Sign Up now to post a comment!
  • Hi guys,, I have backtrack 5 installed physically (not vmware) ..

    in the Start menu (K menu), the "Services" item is not listed 00:43 . How can I get it.

  • Are you able to make iwconfig to work with WPA2?

    How do you connect to a WPA2/AES using the CLI?

  • So if I just need to enter a password instead of an actual key what do I type? Say the password is 12345, do I enter: iwconfig wlan0 essid linksys key 12345 ?

    or something else?

  • How can i network two virtual machines? im using VM player. i dont want to mess up my normal network.

  • Perfect. Thanks, man!

  • Hi!

    Great video!

    But i have one question. I am using backtrack 5 on my dell inspiron 6000, booted from a USB storage device. But i can't get the network connection to work. Any tips? It says "No wirelss connections found" in wicd network manager, and when i boot the computer, it says: "Network devices failed to register".

  • lol Ditto to a few of the comments already posted, I'm getting the "No such process" response after entering the default gateway. Not sure where to go from here.

  • Backtrack rules. Everyone should take a pen testing or linux course in high school. Why not? ITS FUCKING FREE!

  • no such process when i write the gateway :( help!!!

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more