Search This Blog

Network








How to change DNS Servers in Ubuntu Linux
  • Left-click Network Manager icon from the System Tray
  • Click “Edit Connections” from the menu
  • Select the appropriate tab (“Wired/Wireless“) depending on your connection
  • Double-click your connection
  • Select the IPv4 or IPv6 tab depending on your connection (if you’re not sure, you’re probably using IPv4)
  • Change the “Method” to “Automatic (DHCP) addresses only”
  • In the DNS servers box, enter two server IP addresses from here separated by a comma.
  • Click “Save
  • Disconnect and reconnect to your network; restart your browser.
Second Option

You need to configure the /etc/network/interfaces file if you want to change your DNS server via the command line.

It should look something like this:

# The loopback network interface
   auto lo
  iface lo inet loopback


# The primary network interface
    auto eth0
    iface eth0 inet static
    address 192.168.X.X
    netmask 255.255.255.0
    gateway 192.168.X.X
    dns-nameservers X.X.X.X

If you have more than one DNS server, just add a space between each:

dns-nameservers X.X.X.X Y.Y.Y.Y Z.Z.Z.Z

Just replace the X'es with your own IPs and the DNS server of choise, and when this is done, run this command to update the settings: sudo ifdown eth0 && sudo ifup eth0

:- # sudo ifdown eth0 && sudo ifup eth0
Linux Basics - Set A Static IP On Ubuntu

Press Ctrl+Alt+t

Step 1 :- $ su

:- $ password *******

:- # sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0

:- # ifconfig eth0

eth0 Link encap:Ethernet HWaddr 00:15:c5:4a:16:5a

inet addr:10.0.0.100 Bcast:10.0.0.255 Mask:255.255.255.0

inet6 addr: fe95::213:c5df:fe4d:165a/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:497475604 errors:0 dropped:0 overruns:0 frame:0

TX packets:403175454 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:2574778496 (2.5 GB) TX bytes:1618367329 (1.6 GB)

Interrupt:16

To configure a default gateway, you can use the route command in the following manner. Modify the default gateway address to match your network requirements.

:- # sudo route add default gw 10.0.0.1 eth0

To verify your default gateway configuration, you can use the route command in the following manner.

:- # route -n

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

10.0.0.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0

0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth0

If you require DNS for your temporary network configuration, you can add DNS server IP addresses in the file /etc/resolv.conf. In general, editing /etc/resolv.conf directly is not recommanded, but this is a temporary and non-persistent configuration. The example below shows how to enter two DNS servers to /etc/resolv.conf, which should be changed to servers appropriate for your network. A more lengthy description of the proper persistent way to do DNS client configuration is in a following section.
nameserver 8.8.8.8
name server 8.8.4.4

Modern Linux distributions like Ubuntu typically use Network Manager, which provides a graphical way to spoof a MAC address.


For example, on Ubuntu you’d click the network icon on the top panel, click Edit Connections, select the network connection you want to modify, and click Edit. On the Ethernet tab, you’d enter a new MAC address under “Cloned MAC address” and save your changes
 Set A Static IP On Ubuntu

You can also do this the old-fashioned way. This involves taking the network interface down, running a command to change its MAC address, and then bringing it back up. Be sure to replace “eth0″ with the name of the network interface you want to modify and enter the MAC address of your choice:

:- $ su

:- $ Passwd *********

:- # sudo ifconfig eth0 down

:- # sudo ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx

:- # sudo ifconfig eth0 up

0 comments:

Post a Comment