Posts with the tag network setup

Setting up my Raspberry Pi for Raspberry Pi colocation by PCextreme

Setting up my Raspberry Pi for Raspberry Pi colocation by PCextreme.

# Change the root password:
# Full system upgrade:
pacman -Syyu
## Extend the root partition as explained on
fdisk -c /dev/mmcblk0
#   p  d-2  n-p-2  w
# on a newer Arch...

Read on

Determining Local IPv4 and IPv6 Addresses On Mac OS X Via The Command Line

Getting IPv4 and IPv6 addresses of your local machine on Mac OS X 10.8 Mountain Lion is quite easy. Here is how it works:

IF='en0' # ← restrict to wired connection or do  IF=""  to get all
# Get local IPv4 addresses (without...

Read on

TP-Link TL-SG3210, 8-Port, Managed Switch

Product Name: JetStream™ 8-Port Gigabit L2 Lite Managed Switch with 2 SFP Slots
Product Code: TL-SG3210

This is a cheap 8-port Gigabit switch if you consider its capabilities. It can be configured in many ways via the web interface or (in an automated way) via a CLI interface (Telnet / SSH like)....

Read on

Install DNSmasq locally on Mac OS X via Homebrew

This post describes hot to use dnsmasq as a local DNS server for faster caching and to resolve domain names in your private address space.

Installing dnsmasq

Installing dnsmasq is easy when you have Homebrew installed on your Mac:

brew update && brew install dnsmasq

And follow Homebrew's hints on...

Read on

OpenWrt or DD-WRT on the Buffalo WZR-HP-AG300H

A quite new and powerful alternative to the TP-Link TL-WR1043ND running OpenWrt is the Buffalo WZR-HP-AG300H.

About the Hardware

The Buffalo WZR-HP-AG300H contains a powerful set of hardware, maybe the strongest for SOHO routers currently on the market:

CPU Ram Flash Network WiFi USB Serial JTag
Atheros AR7161@680MHz (MIPS) 128MB 32MB 4+1 using an Atheros AR8316 Gigabit Ethernet switch 2x -...

Read on

OpenWrt: Configure WiFi Client as WAN and set up a 2nd AP to redistribute the WAN-Access

This is a nice thing to do if you are in a hotel and want to redistribute a single WiFi connection to other computers.

The setup works as follows: The WiFi with the SSID Telekom is the one being provided in the hotel. Here we can connect to it without encryption,...

Read on

OpenWrt on a TP-Link TL-WR1043ND Gigabit Router

About the Hardware

The TP-Link TL-WR1043ND contains a great set of hardware for its price:

CPU Ram Flash Network Gigabit USB Serial JTag
Atheros AR9132@400MHz (MIPS) 32MB 8MB 4+1 Yes 1 x 2.0 Yes Yes

Please refer to for further details on the hardware.

My hardware version is (DE)v1.0.

<img alt="" class="alignnone size-medium wp-image-3246" height="130" src="/wp-content/uploads/TP-Link_TL-WR1043ND_back-side_hidden-300x130.jpg"...

Read on

Bind Multiple IPs To One Physical Interface on Mac OS X

Via the System Preferences: Network pane

  • Go to System PreferencesNetwork.
  • Click on Ethernet (or AirPort)
  • Click on the Configuration WheelDuplicate Service...

You can now configure each instance with different settings, and you're done.

On the Terminal

If you just need to quickly assign an IP/subnet alias to an interface, you can do...

Read on

Bind Multiple IPs To One Physical Interface on Linux

In advanced computing you may encounter situations where you want to bind multiple IP addresses on one physical network interface. This post describes how to do it with Ubuntu Linux (should work with Debian too).

Temporarily with ifconfig

This method is temporary only as the additional IP address will be gone after...

Read on

Private Subnet with Ubuntu as Router

Suppose we have the following setup:

  • A Computer with Ubuntu installed and two physical network interfaces (might also be virtual, but that's advanced)
  • We have an internet connection on this computer set up and working. Internet traffic goes out (and in) on the network interface eth2
  • We want to create a private subnet
  • The...

Read on


denyhost can help keep out unwanted guests from your ssh server.


# /etc/hosts.deny


# End of file


# /etc/hosts.allow

sshd: ALL EXCEPT /etc/hosts.evil

# End of file

Read on

IP address calculators


sudo aptitude install python-ipcalc

the needed module is /usr/share/pyshared/


sudo aptitude install sipcalc

example usage:


sudo aptitude install ipcalc



gip - IP calculator for gnome

sudo aptitude install gip

Read on

Advanced Usage of ethtool

There exist a comparison of ethtool in linux with the equivalents in solaris command-by-command... It's great!

not available anymore... but here is an archived version:


Read on

Forbid root Login via SSH

Edit the configuration file of the SSH daemon:

sudo gedit /etc/ssh/sshd_config

Change the line containing PermitRootLogin yes to PermitRootLogin no , save the file and restart the SSH server.

sudo /etc/init.d/ssh restart

Read on

Change network setup from DHCP setup to a static IP configuration

My network interface is a Intel PRO/1000 PT Dual-Port-Server-Adapter (PCIe x4) (chipset: Intel 82571GB). It provides two physical links that I use both: One for my private subnet and one as the public interface to the public network (Internet via 100Mbit Ethernet at KHG, University of Frankfurt am Main). I...

Read on


This blog post has grown to large. Please refer to the more detailed posts on IPv6 tagged with ipv6:

DNS entries for IPv6 ready web sites

  • A record: normal domain to ip address resolution
  • MX record: email server lookup, must resolve to a server address that is resolved to an IP...

Read on

Defend Your Network From Slow Scanning,339028271,339272421,00.htm


Read on

Set Your Physical NIC to a Different MAC Address

It's called MAC spoofing.

The commands do achieve it are:

  1. Bring down the interface and enter a new MAC address
  2. Bring up the interface

On Ubuntu Linux this can be achieved (for nic eth1 and a new mac address of 00:14:11:12:34:15) like this:

sudo ifconfig eth1 down hw ether 00:14:11:12:34:15
sudo ifconfig eth1 up


Read on

checksum offloading - wireshark

If wireshark reports many wrong checksums, this can be caused by checksum calculations done by hardware which means that the wrong checksums reported by Wireshark are simply meaningless.

If you're sure, that's the problem, you may simple not care about wrong checksums:

  • Turn off the checksum offloading in the network...

Read on

DD-WRT on the ASUS WL-500G Premium v1 WiFi Router

WOL – Wakeup Computers via LAN

to wake up the computers on the homenetwork use the following commands (execute on the router) connect to the router first:


And wake up the computer with the network interface with the MAC 00:11:24:xx:yy:zz (assuming it is in the network

/usr/sbin/wol -i...

Read on

Set up Advanced Networking without Network Nanager

failback connection (routing):
advanced routing:
secondary virtual interface on one physical interface:
default gateway:
static DNS with DHCP: and

multi homing (using two internet connections at the same time) using policy routing:


  • redundant internet connections (but with default network...

Read on

Renaming Network Interfaces (When Changing Network Cards)

When I inserted a new network card into my Linux computer, the new network interface was named with an incremented number at the end. I didn't want that as my network setup (firewall rules etc.) were set up for the former name. So I had to change the configuration to rename...

Read on

CLI for the NetworkManager

NetworkManager has a DBUS API, so other applications can use DBUS to communicate with it and change its settings. I found three different ways to do this on the command line using a CLI (command line interface):

nmcli (NetworkManagerCmdline)

As of 2010-12-18 the most actively maintained project is nmcli:

Compare nmcli...

Read on

Check Open Ports on Local Machine Using Netstat

run netstat like this:

sudo netstat -lntup

and you get an output like this:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State     ...

Read on

OpenDNS - The better DNS-Server

Servers: and

(Fast alternative: google dns, servers: and I use the google DNS servers when going online via my mobile phone using 3G network. It is by far faster than the DNS server of the network provider.)

Perl client to update the openDNS IP (if...

Read on

Ifconfig - dissected and demystified

eth0      Link encap:Ethernet  HWaddr 00:70:40:42:8A:60
       inet addr:  Bcast:  Mask:
       RX packets:160889...

Read on

React when Network Interface is slow (as in half-duplex mode etc.)

Analyse the situation by taking a look at the configuration and stats:

ifconfig -a
netstat -s

Check if your gateway and DNS servers are reachable. If only one of the dns servers is not reachable edit /etc/resolv.conf manually (will be overwritten by next network change).

To set the network interface eth1 to 100MBits...

Read on

Share Internet Connection

install needed packages:

sudo aptitude install dnsmasq ipmasq dhcp3-server

configure network/interfaces

auto lo
iface lo inet loopback
auto eth0
auto eth1
iface eth1 inet static
  wireless-mode master
  wireless-essid HDFredistribution


Change in /etc/default/dhcp3-server the line INTERFACES="" to INTERFACES="eth1"

In /etc/dhcp3/dhcpd.conf comment out the...

Read on

Set up NetworkManager for VPN

sudo aptitude install network-manager-openvpn network-manager-pptp network-manager-vpnc

Read on

Use the tool `ip` to examine your network status

The most useful three commands are:

ip link list
ip address show
ip route show

Read on

ddclient - a DynDNS Client on Ubuntu Linux

Install ddclient:

sudo aptitude install ddclient

Now configure the program:

sudo gedit /etc/ddclient.conf

Enter your DynDNS account data and computer setup:

use=if, if=eth2 # the mode and network interface
# DynDNS account:

And set ddclient to run automatically on startup:

sudo gedit /etc/default/ddclient

Set the mode of ddclient...

Read on

Set up Port-Knocking

The installation of the port knocking daemon is quite simple:

sudo apt-get install knockd

To start the knockd daemon automatically: uncomment START_KNOCKD=1 in /etc/default/knockd.


Edit the config file /etc/knockd.conf:

   logfile = /var/log/knockd.log
   sequence    = <span...

Read on

Make Ubuntu System Bootable Using Wake On LAN

Install the package ethtool:

sudo aptitude install ethtool

Add the ethtool command to your nic using its configuration in /etc/network/interfaces (last line):

iface eth0 inet static
    pre-down /usr/sbin/ethtool -s eth0 wol...

Read on

Looking for Windows Neighbourhood Using smb4k

if you want to search the domains / workgroups / shares of you MS Windows neighbourhood then do it using smb4k.


sudo apt-get install smb4k

Read on

Set up IPtables Firewall

set up your rules:

1.As 1st rule (INPUT 1) allow all traffic on loopback adapter lo (so your programs on localhost can communicate if all other traffic is blocked later)

sudo iptables -I INPUT 1 -i lo -j ACCEPT

2.Allow incoming traffic on port 80:

sudo iptables -A...

Read on

Set up Wireless with Different Profiles and WPA/WPA2 encryption (using /etc/network/interfaces)

Setup of WPA encrypted WiFi using a text file based configuration

You find the important information on how to set it up in the documentation of wpasupplicant:

zmore /usr/share/doc/wpasupplicant/README.modes.gz

For example if you want to connect to a WLAN named "WLAN-AF6432" with WPA security, you first have to get the encryption...

Read on

Remove Network-Manager

You might want to remove the network manager if you want to set up your network interfaces using the configuration file /etc/network/interfaces (in this case you just don't need Network Manager).

sudo aptitude remove network-manager

do not remove:!!!: ubuntu-desktop but do remove: knetworkmanager, network-manager-gnome und network-manager-kde


Read on