Configuring ddclient

ddclient updates IP addresses at dynamic DNS services.

# install ddclient
$ sudo apt-get install ddclient


Selected in the installation process and followed the prompts. Did not need to manually enter anything.


Enable Dynamic DNS for your domain
Login to your Namecheap control panel and enable dynamic DNS for your domain.
You’ll get a really long password string to use. Save that for now as you’ll need it later on.
namecheap dynamic dns password

$ sudo nano /etc/ddclient.conf

# example configuration
# the login is the domain name and password is the hash you saved in the prior step called ‘Dynamic DNS Password’.

# Configuration file for ddclient generated by debconf
# /etc/ddclient.conf

use=web,, web-skip='IP Address'

# remove cache
$ sudo rm /var/cache/ddclient/ddclient.cache

# force update, you may need to delete cache
$ sudo ddclient --daemon=0 --debug --verbose --noquiet

# another configuration file
$ sudo nano /etc/default/ddclient
# to enable automatic updates you must enable the daemon, see specified settings


# restart ddclient
$ sudo /etc/init.d/ddclient restart


ddns, Dynamic DNS

Connect to wifi in the command line

The wifi access point security will determine the way you connect to it.

If WEP (less secure)


Configuring WPA
# view enabled connections
$ ifconfig

# view enabled and disabled connections
$ ifconfig -a

# To find out the name of your wireless card device. Look at the row that has some information in it, not ‘no wireless extensions’. In this example its wlan0.
$ iwconfig

# find wireless/wifi access points
$ sudo iwlist scan
# an alternative can be “wavemon” if installed on your machine

# Add wifi network ssid and password
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
# add to the bottom of file


# wpa_supplicant.conf is being included in /etc/network/interfaces. Another option would be to edit interfaces file directly. Example Below.

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0

iface wlan0 inet dhcp
	wpa-ssid "your_wireless_ssid"
	wpa-psk "your_wireless_password"

# restart connection. This is an alternative to restarting the computer
$ sudo ifdown wlan0
$ sudo ifup wlan0

# you should now see an ip address under “inet addr:”
$ ifconfig wlan0

# test internet connection
sudo ping

# useful commands
# 10 Useful “IP” Commands to Configure Network Interfaces

$ ip addr show
$ ip route show

wireless interface, network, raspberry pi

Stop DNS hijacking and setting DNS server

– disable DNS hijacking
– change DNS server
– setting up google as DNS server

What is DNS hijacking ?
– DNS redirecting

Why don’t I want it ?
– When I but a url that is not recognized it gets redirected to ads
– It interferes with avahi-daemon (zeroconf)

How do I know its occurring ?
– by typing a non existing url in the browser
– ping a non existing url
– in windows by running nslookup in the command line and seeing a foreign ip address

How to stop it ?
– setting up a specific router (
– or changing your computer dns server (
– use QuickSetDNS

More ?
– in windows command line running ipconfig /all will show what dns server you’re running

In linux
You will need to edit the ‘/etc/resolv.conf’ with the nameserver of your choice. You can manually edit it (without restarting anything) and have it work however it you restart you computer it will be overwritten by resolvconf. To avoid the overwriting you need to edit ‘/etc/resolvconf/resolv.conf.d/head’ instead. Now if you cannot find that file you will need to update ‘resolvconf’ by running ‘$ apt-get install resolvconf’ (had to do it for raspberry pi). source
To force resolvconf to update /etc/resolv.conf run
$ sudo resolvconf -u

Another ‘not a good idea’ option is to use ‘$ chattr +i’ to lock down ‘resolv.conf’ which seems hacky

time warner
bright house network

Virtual Box Internet Issue

The problem:
unable to connect to internet
$ ping google (doesnt work)

What might cause the problem:
Added the ‘Host-only Adapter’ network to the virtual box

remove static ip from /etc/network/interfaces (changed it back to dynamic)

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

#auto eth0
#iface eth0 inet static
#       address
#       netmask
#        network
#        broadcast
#        gateway

remove the 2nd network and only stayed with the 1st one (Bridged Adapter)

reflesh the MAC address (not sure if this help)


edit /etc/network/interfaces changed back to static ip address

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp

auto eth0
iface eth0 inet static

edit using the GUI

operating system:
Linux cowboy 3.12-kali1-686-pae #1 SMP Debian 3.12.6-2kali1 (2014-01-06) i686 GNU/Linux

Change Linksys WRT54G Default Gateway IP Address

Changing linksys local/default gateway ip address from to

1. Connect an Ethernet cord to you router LAN and your computer
2. Login into the router by opening a browser and typing
3. Go to Setup-> basic setup
4. change “Local IP Address:” to

5. Unplug the power to the router and Ethernet cord from the computer and wait 30 seconds
6. Plug everything back and you should now be able to log into router with
and if you run ipconfig in the command line you should see the default gateway as
also see other parts of the software with same ip address such as

7. Unplug the Ethernet cord from the computer and see if you can connect to it wireless
8. Plug the router WAN to the modem for internet.
9. You’ll need to configure you linksys router to get internet

Setting Up Linksys Router

10. Done.

The reason I needed this was because I have two routers and they cannot have both the same gateway

How to change the motorola router

Motorola SBG6580 Router / Modem

Motorola SBG6580 Router / Modem

My router was recently changed and I tried to bridge it (act only as a modem) but it didn’t work. I had a perfect working Linksys router but my ISP had to changed my old modem to a 2 in 1 piece of shit Motorola SBG6580. The default gateway for the Motorola is different than the Linksys so I had to re-configure my server, which I did however there were some stuff that wasn’t working correctly. I didn’t know how to track it down or how to fix it so instead of going thru that headache I decided to change the Motorola default gateway/LAN IP address to what the Linksys was and it worked.

To change the LAN IP address from to
log into you motorola router
Navigate to,
Basic-> Setup-> change Lan Ip address to
then click apply. you wont be able to connect to wireless internet
so connect to the Ethernet cord and go to
Basic-> Setup-> click “Renew WAN LEASE”

Motorola SBG6580


>change IP address on linux

>I was having issues with git connection to my laptop thru ssh. Then after looking into it, my laptop had changed IP address. Now I didnt want to change all the git fetch origin source on all my repositories so here is how to change the IP address back.

# sudo ifconfig [connection] [IP you want]
$ sudo ifconfig eth0


How to set up Static IP address for Server

Its good practice to give your server a static IP address because
1. You don’t always need to reconfigure your router
2. It’s easy to do

Click on the link below for a full explanation

Below is an example. Make sure you change the interface and the private ip to match the gateway

auto wlan0
iface wlan0 inet static

PS. It’s not true that you need a static IP address for the world to access you website from you server. You can also use a dynamic (DHCP), which is the default when you set up your Ubuntu server.

For more infomation on Making your server accessible to the internet