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:
passwd
# Full system upgrade:
pacman -Syyu
## Extend the root partition as explained on http://goo.gl/kFOnW
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 http://wiki.openwrt.org/toh/tp-link/tl-wr1043nd#hardware 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

http://denyhosts.sourceforge.net/
http://www.heise.de/security/artikel/SSH-vor-Brute-Force-Angriffen-schuetzen-270140.html

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

/etc/hosts.deny:

#
# /etc/hosts.deny
#

ALL: ALL: DENY

# End of file

/etc/hosts.allow:

#
# /etc/hosts.allow
#

sshd: ALL EXCEPT /etc/hosts.evil

# End of file
...

Read on

IP address calculators

python-ipcalc

http://packages.ubuntu.com/lucid/python-ipcalc
/usr/share/doc/python-ipcalc/README.Debian

sudo aptitude install python-ipcalc

the needed module is /usr/share/pyshared/ipcalc.py

sipcalc

http://www.routemeister.net/projects/sipcalc/
http://packages.ubuntu.com/lucid/sipcalc
http://manpages.ubuntu.com/manpages/lucid/man1/sipcalc.1.html

sudo aptitude install sipcalc

example usage: http://www.cyberciti.biz/faq/linux-subnet-calculator-cidr/

ipcalc

sudo aptitude install ipcalc

usage:

ipcalc 192.168.1.7/24

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: https://web.archive.org/web/20120918092833/http://hub.opensolaris.org/bin/view/Project+brussels/ethtool-dladm-comparison

...

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

IPv6

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

https://blog.philippklaus.de/tag/ipv6/

DNS entries for IPv6 ready web sites

http://en.wikipedia.org/wiki/List_of_DNS_record_types

  • 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

http://www.builderau.com.au/strategy/businessmanagement/soa/Defend-your-network-from-slow-scanning/0,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

To...

Read on

checksum offloading - wireshark

http://www.wireshark.org/docs/wsug_html_chunked/ChAdvChecksums.html

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:

ssh root@your.dyndns.org

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

/usr/sbin/wol -i...

Read on

Set up Advanced Networking without Network Nanager

failback connection (routing):
https://help.ubuntu.com/community/InternetAndNetworking/DualHomedGatewayDHCP
advanced routing: http://lartc.org/howto/
secondary virtual interface on one physical interface: http://www.ubuntugeek.com/ubuntu-networking-configuration-using-command-line.html
default gateway: http://www.cyberciti.biz/faq/howto-debian-ubutnu-set-default-gateway-ipaddress/
static DNS with DHCP: https://help.ubuntu.com/community/StaticDnsWithDhcp and http://ubuntuforums.org/showthread.php?t=544383#2

multi homing (using two internet connections at the same time) using policy routing: http://www.debian-administration.org/article/Policy_routing

plan:

  • 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: http://fedoraproject.org/wiki/Features/NetworkManagerCmdline.

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

https://www.opendns.com

Servers: 208.67.222.222 and 208.67.220.220

(Fast alternative: google dns, servers: 8.8.8.8 and 8.8.4.4. 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

http://linuxhelp.blogspot.com/2006/11/ifconfig-dissected-and-demystified.html

eth0      Link encap:Ethernet  HWaddr 00:70:40:42:8A:60
       inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
       UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
       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

http://ph.ubuntuforums.com/showthread.php?t=335465

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
  address 192.168.0.1
  netmask 255.255.255.0
  broadcast 192.168.0.255
  wireless-mode master
  wireless-essid HDFredistribution

dhcp

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

http://wiki.ubuntuusers.de/NetworkManager#VPN

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

Read on

Use the tool `ip` to examine your network status

http://lartc.org/howto/lartc.iproute2.explore.html

The most useful three commands are:

ip link list
ip address show
ip route show
...

Read on

ddclient - a DynDNS Client on Ubuntu Linux

https://help.ubuntu.com/community/DynamicDNS
http://wiki.ubuntuusers.de/DynDNS-Clients

Install ddclient:

sudo aptitude install ddclient

Now configure the program:

sudo gedit /etc/ddclient.conf

Enter your DynDNS account data and computer setup:

pid=/var/run/ddclient.pid
protocol=dyndns2
use=if, if=eth2 # the mode and network interface
# DynDNS account:
server=members.dyndns.org
login=philippk
password='sdf1dpw'
philippk.ath.cx

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.

Configuration:

Edit the config file /etc/knockd.conf:

[options]
   logfile = /var/log/knockd.log
[openSSH]
   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
    address 192.168.100.90
    netmask 255.255.255.0
    gateway 192.168.100.1
    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.

install:

sudo apt-get install smb4k
...

Read on

Set up IPtables Firewall

https://help.ubuntu.com/community/IptablesHowTo

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