Telstra 3G Raspberry Pi

3 07 2012

Bringing a couple of my previous posts together, I finally got my Telstra 3G dongle to work on the Raspberry Pi.

First challenge was the device detecting as a CD-Rom (to make it easier for Windoze users). This is quickly solved by installing usb_modeswitch (notice the change from device 19d2:2000 (presented as CD-Rom) to 19d2:0031 (The USB modem mode)

root@raspberrypi:~# lsusb | grep ZTE
Bus 001 Device 004: ID 19d2:2000 ONDA Communication S.p.A. ZTE MF627/MF628/MF628+/MF636+ HSDPA/HSUPA

root@raspberrypi:~# apt-get install usb-modeswitch

root@raspberrypi:~# lsusb | grep ZTE
Bus 001 Device 005: ID 19d2:0031 ONDA Communication S.p.A. ZTE MF110/MF636

Unplugging plugging the dongle back in now gives you the ttyUSB devices you need.

root@raspberrypi:~# dmesg | grep ttyUSB
usb 1-1.2.3: GSM modem (1-port) converter now attached to ttyUSB0
usb 1-1.2.3: GSM modem (1-port) converter now attached to ttyUSB1
usb 1-1.2.3: GSM modem (1-port) converter now attached to ttyUSB2
usb 1-1.2.3: GSM modem (1-port) converter now attached to ttyUSB3

The easy thing to do would to to use the sakis3g script – its compiled for arm ….. but I couldnt get it to work, it would just fail to connect.

Next easiest thing would be to use wvdial …. however this isnt ported to arm …. dammit

So, its back to pppd & chat scripts.

root@raspberrypi:~# cat telstra.chat
ABORT ‘NO CARRIER’
ABORT ‘NO DIALTONE’
ABORT ‘BUSY’
ABORT ‘ERROR’
ABORT ‘NO ANSWER’
” ‘ATZ’
OK ‘AT&F’
OK ‘ATQ0 V1 E1’
OK ‘AT&D2 &C1’
OK ‘AT+FCLASS=0’
OK ‘ATS0=0’
OK ‘AT+CGDCONT=1,”IP”,”telstra.internet”‘
OK ‘ATDT*99#’
CONNECT ”

root@raspberrypi:~# /usr/sbin/pppd /dev/ttyUSB2 460800 modem crtscts defaultroute noipdefault usepeerdns ktune noauth lock nobsdcomp novj connect “/usr/sbin/chat -v -f /root/telstra.chat”

At this point, the dongle light flashed, I did the victory dance & poured a drink – however it was short lived.

Looking at the logs in /var/log/messages – we see something wrong. ppp connects, but then the USB dongle disconnects (the bus resets) – bugger.

Jul  3 21:25:21 raspberrypi pppd[1619]: Serial connection established.
Jul  3 21:25:21 raspberrypi pppd[1619]: Using interface ppp0
Jul  3 21:25:21 raspberrypi pppd[1619]: Connect: ppp0 <–> /dev/ttyUSB2
Jul  3 21:25:22 raspberrypi pppd[1619]: PAP authentication succeeded
Jul  3 21:25:22 raspberrypi pppd[1619]: kernel does not support PPP filtering
Jul  3 21:25:26 raspberrypi kernel: DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
Jul  3 21:25:26 raspberrypi kernel:
Jul  3 21:25:26 raspberrypi kernel: DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
Jul  3 21:25:26 raspberrypi kernel:

<snip>

Jul  3 21:25:28 raspberrypi kernel:
Jul  3 21:25:28 raspberrypi kernel: DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
Jul  3 21:25:28 raspberrypi kernel:
Jul  3 21:25:28 raspberrypi kernel: DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
Jul  3 21:25:28 raspberrypi kernel:
Jul  3 21:25:29 raspberrypi kernel: usb 1-1.2: USB disconnect, device number 8
Jul  3 21:25:29 raspberrypi kernel: option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
Jul  3 21:25:29 raspberrypi kernel: option 1-1.2:1.0: device disconnected
Jul  3 21:25:29 raspberrypi kernel: option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
Jul  3 21:25:29 raspberrypi kernel: option 1-1.2:1.1: device disconnected
Jul  3 21:25:29 raspberrypi pppd[1619]: Modem hangup
Jul  3 21:25:29 raspberrypi pppd[1619]: Connection terminated.
Jul  3 21:25:29 raspberrypi kernel: option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
Jul  3 21:25:29 raspberrypi kernel: option 1-1.2:1.3: device disconnected
Jul  3 21:25:29 raspberrypi kernel: option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
Jul  3 21:25:29 raspberrypi kernel: option 1-1.2:1.4: device disconnected

I had read about power causing issues on the USB devices, sometimes displaying these debug messages, so i tried using the 2A supply, but got the same result. I then tried out my funky new powered usb hub, courtesy of the crew @ Hak5.

Having the USB Data & USB Power plugs both in the Pi – it now works like a charm, the kernel debug messages are a thing of the past.

Jul  3 21:37:55 raspberrypi chat[1307]: CONNECT
Jul  3 21:37:55 raspberrypi chat[1307]:  — got it
Jul  3 21:37:55 raspberrypi chat[1307]: send (^M)
Jul  3 21:37:55 raspberrypi pppd[1305]: Serial connection established.
Jul  3 21:37:55 raspberrypi pppd[1305]: Using interface ppp0
Jul  3 21:37:55 raspberrypi pppd[1305]: Connect: ppp0 <–> /dev/ttyUSB2
Jul  3 21:37:56 raspberrypi pppd[1305]: PAP authentication succeeded
Jul  3 21:37:56 raspberrypi pppd[1305]: kernel does not support PPP filtering
Jul  3 21:37:58 raspberrypi pppd[1305]: Could not determine remote IP address: defaulting to 10.64.64.64
Jul  3 21:37:58 raspberrypi pppd[1305]: local  IP address 10.138.162.113
Jul  3 21:37:58 raspberrypi pppd[1305]: remote IP address 10.64.64.64
Jul  3 21:37:58 raspberrypi pppd[1305]: primary   DNS address 10.4.182.20
Jul  3 21:37:58 raspberrypi pppd[1305]: secondary DNS address 10.4.81.103

root@raspberrypi:~# ifconfig ppp0
ppp0      Link encap:Point-to-Point Protocol  
          inet addr:10.138.162.113  P-t-P:10.64.64.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:705 errors:0 dropped:0 overruns:0 frame:0
          TX packets:624 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:621353 (606.7 KiB)  TX bytes:40301 (39.3 KiB)
root@raspberrypi:~# traceroute www.google.com
traceroute to www.google.com (74.125.237.148), 30 hops max, 60 byte packets
1  10.5.194.242 (10.5.194.242)  635.526 ms  674.257 ms  683.415 ms
2  * * *
3  * * *
4  Bundle-Ether12.fli8.Adelaide.telstra.net (120.151.255.29)  780.113 ms  779.887 ms  779.557 ms
5  Bundle-Ether1.fli-core1.Adelaide.telstra.net (203.50.11.9)  779.381 ms  779.129 ms  787.440 ms
6  Bundle-Ether9.win-core1.Melbourne.telstra.net (203.50.11.91)  787.405 ms  110.280 ms  105.926 ms
7  Bundle-Pos3.ken-core4.Sydney.telstra.net (203.50.11.12)  122.242 ms  122.008 ms  121.642 ms
8  Bundle-Ether1.ken39.Sydney.telstra.net (203.50.6.146)  134.345 ms  134.449 ms  149.559 ms
9  72.14.198.54 (72.14.198.54)  179.171 ms  179.048 ms  156.730 ms
10  66.249.95.226 (66.249.95.226)  115.508 ms  108.826 ms  118.016 ms
11  72.14.237.137 (72.14.237.137)  137.651 ms  125.653 ms  124.900 ms
12  syd01s13-in-f20.1e100.net (74.125.237.148)  119.918 ms  119.181 ms  118.817 ms
root@raspberrypi:~#




WiFi Pi

29 06 2012

The next logical step was to remove the dependency on physical ethernet cabling to my Raspberry Pi.

I struggled with a couple of cards, but eventually got success with a tiny little NG54/N150 Wireless USB Micro Adapter – WNA1000M.

I cant claim the credit – it was a combination of the following sites that eventually got a result.

http://www.69b.org/prox-pi.php/rpo/phpBB3/viewtopic.php?f=66&t=6737&sid=6f0540c1c93a8bd41b309c6832b6058b
http://www.ctrl-alt-del.cc/2012/05/raspberry-pi-meets-edimax-ew-7811un-wireless-ada.html
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=5249

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=6256
http://dl.dropbox.com/u/80256631/install-rtl8188cus.txt
http://dl.dropbox.com/u/80256631/install-rtl8188cus.sh

root@raspberrypi:~# apt-get install wget unzip wireless-tools wpasupplicant
root@raspberrypi:~# wget http://www.electrictea.co.uk/rpi/8192cu.ko
root@raspberrypi:~# wget ftp://ftp.dlink.com/Wireless/dwa130_revC/Drivers/dwa130_revC_drivers_linux_006.zip
root@raspberrypi:~# unzip dwa130_revC_drivers_linux_006.zip

root@raspberrypi:~# install -m 644 ./8192cu.ko /lib/modules/3.1.9+/kernel/drivers/net/wireless/
root@raspberrypi:~# depmod -a

root@raspberrypi:~# mkdir -p /usr/local/lib/firmware/RTL8192U
root@raspberrypi:~# mv rtl8192u_linux_2.6.0006.1031.2008/firmware/RTL8192U/* /usr/local/lib/firmware/RTL8192U/
root@raspberrypi:~# vi /etc/wpa_supplicant/wpa_supplicant.conf

root@raspberrypi:~# cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=2

network={
ssid="WiFiNetworkSSID"
key_mgmt=WPA-PSK
proto=WPA2
pairwise=CCMP
group=CCMP
psk="C0mpl3xS3cur3P$K"
}
root@raspberrypi:~#

touch /etc/modprobe.d/blacklist.conf
echo "blacklist rtl8192cu" >> /etc/modprobe.d/blacklist.conf
touch /etc/modules
echo "8192cu" >> /etc/modules

**If your wifi is wlan2 or wlan3 etc - you can rename by deleting the old nics from ....

root@raspberrypi:~# vi /etc/udev/rules.d/70-persistent-net.rules

root@raspberrypi:~# vi /etc/network/interfaces

auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

And for the results:

root@raspberrypi:~# lsusb
Bus 001 Device 004: ID 0846:9041 NetGear, Inc. WNA1000M 802.11bgn [Realtek RTL8188CUS]

root@raspberrypi:~# iwconfig wlan0
wlan0     IEEE 802.11bgn  ESSID:"WiFiNetworkSSID"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.447 GHz  Access Point: 02:5E:52:7A:AF:12   
          Bit Rate:150 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:****-****-****-****-****-****-****-****   Security mode:open
          Power Management:off
          Link Quality=88/100  Signal level=88/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@raspberrypi:~# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr c4:3d:c7:79:3a:04  
          inet addr:192.168.0.140  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:261 errors:0 dropped:0 overruns:0 frame:0
          TX packets:140 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:53777 (52.5 KiB)  TX bytes:33212 (32.4 KiB)




Tor & disabling IPv6 in Linux

23 06 2012

Install & configure tor / privoxy & proxychains

– Add a new repo

vi /etc/apt/sources.list

deb http://deb.torproject.org/torproject.org lucid main

– Get the key

gpg –keyserver keys.gnupg.net –recv 886DDD89
gpg –export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add –

– Installapt-get update
apt-get install tor tor-geoipdb
apt-get install privoxy

– Check privoxy config to make sure listen address is 127.0.0.1:8118 & configure socks4a proxy

vi /etc/privoxy/config

listen-address 127.0.0.1:8118
forward-socks4a / 127.0.0.1:9050 .

– change keep-alive-timeout & socket-timeout to 600

keep-alive-timeout 600
socket-timeout 600

– Start privoxy

/etc/init.d/privoxy start

– Change your browser to point @ your proxy 127.0.0.1:8118
– Check that you connect over tor

https://check.torproject.org/

– Next up, install proxychains so you can use other tools over tor

apt-get install proxychains

– Verify the following line is in /etc/proxychains.conf

socks4 127.0.0.1 9050

– Remove tor & privoxy from startup (init when you need them)

update-rc.d -f tor remove
update-rc.d -f privoxy remove

– Start them up

service tor start
service privoxy start

– Check its working – “proxychains <command>”

root@bt:~# netstat -antp | grep LISTEN
tcp        0      0 127.0.0.1:8118          0.0.0.0:*               LISTEN      3569/privoxy
tcp        0      0 127.0.0.1:9050          0.0.0.0:*               LISTEN      3562/tor

root@bt:~# curl -s icanhazip.com
101.171.255.232

root@bt:~# proxychains curl -s icanhazip.com
|S-chain|-<>-127.0.0.1:9050-<><>-174.132.254.58:80-<><>-OK
31.172.30.1- Have fun, then shut em down when you are done

service privoxy stop
service tor stop

– There are many reasons you may not want IPv6 running on your machine (for example if you were using tor & didnt want IPv6 traffic to go directly to a target instead of via your IPv4 socks proxy)

root@bt:~# vi /etc/sysctl.conf

#disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

root@bt:~# sysctl -p





Telstra3G USB in Linux

23 06 2012

Telstra 3G USB Dongles are good for connectivity on the go.

http://www.zte.com.au/telstra/MF626i.htm
https://wiki.ubuntu.com/AustralianTeam/Projects/WirelessBroadbandInformation

root@bt:~# lsusb | grep ZTE
Bus 001 Device 005: ID 19d2:0031 ONDA Communication S.p.A. ZTE MF110/MF636

root@bt:~# dmesg | grep ttyUSB
[ 2306.101269] usb 1-4: GSM modem (1-port) converter now attached to ttyUSB0
[ 2306.101613] usb 1-4: GSM modem (1-port) converter now attached to ttyUSB1
[ 2306.102140] usb 1-4: GSM modem (1-port) converter now attached to ttyUSB2
[ 2306.102487] usb 1-4: GSM modem (1-port) converter now attached to ttyUSB3
root@bt:~#

There is a hard way using wvdial etc – or an easy way. I chose the easy way – a great little script called sakis3g

====================================

http://wiki.sakis3g.org/wiki/index.php?title=Sakis3G_script
http://www.sakis3g.org/#download

wget “http://www.sakis3g.org/versions/latest/i386/sakis3g.gz&#8221;
gunzip sakis3g.gz
chmod +x sakis3g
./sakis3g –interactive

====================================

root@bt:~/scripts# ./sakis3g connect USBINTERFACE=”3″ APN=”telstra.internet”

root@bt:~/scripts# ./sakis3g connect info
MF626s connected to Telstra (50501).
Connection Information

Interface: P-t-P (ppp0)

Connected since: 2012-06-11 20:52
Kilobytes received: 376
Kilobytes sent: 57

Network ID: 50501
Operator name: Telstra
APN: telstra.internet

Modem: MF626s
Modem type: USB
Kernel driver: option
Device: /dev/ttyUSB2

IP Address: 10.192.124.71
Subnet Mask: 255.255.255.255
Peer IP Address: 10.64.64.64
Default route(s): 10.64.64.64
====================================

root@bt:~/scripts# ./sakis3g disconnect
Disconnected.





My Raspberry Pi comes to life

16 06 2012

Like most of the rest of the world’s IT population, I got excited about the Pi & ordered one.

It has arrived & I have had a little bit of time to play with it & I am pretty impressed.

BUILD A CASE

The first thing to do was a case, I didnt want to short it out on anything & it just felt too fragile & vulnerable naked

I printed this one (http://www.raspberrypi.org/phpBB3/viewtopic.php?f=40&t=6500) on some card (manila folder) & folded it up

 

A larger selection can be found here: http://elinux.org/RPi_Cases

PREPARE A DISTRO

Next we need a Distro:

http://elinux.org/RaspberryPiBoardDistributions

For each image, just use dd in Linux **Be Careful – make sure you have the right device to write the image to. This would be the SD card, not your hard drive !!

dd if=.img of=/dev/sdb

I have been primarily playing with the Debian Squeeze distro

http://downloads.raspberrypi.org/images/debian/6/debian6-19-04-2012/debian6-19-04-2012.zip
User: pi / raspberry

Raspbian is based on Debian Wheezy, which is newer than Squeeze

http://www.raspbian.org/
User: root / raspbian

The developing Raspbmc (XBMC) looks very promising – I have watched a couple of movies with it, with no performance issues

http://wiki.xbmc.org/index.php?title=Raspbmc

http://www.raspbmc.com/2012/05/raspbmc-is-now-in-beta/

http://download.raspbmc.com/downloads/bin/ramdistribution/installer-testing.img.gz

Note: you need at least a 2GB SD card. Raspbmc will use the full size of your card.

**First boot needs internet (ethernet cable/ dhcp) – the installer prepares the sdcard, then raspbmc is downloaded & setup at first boot.

TIME FOR POWER

The Pi runs on 5v, connected via Micro USB http://elinux.org/RPi_Hardware_Basic_Setup#Power_Supply – which can be supplied by pretty much any phone charger / USB port these days. The only recommendation provided by the vendor is choose a supply that will provide 5v and ~700mA. They will apparently run “stable” on any voltage between  4.75 and 5.25 volts.

Many people have been using the iPhone / iPad chargers without any issues (me included). But as an experiment, I decided to see what they were putting out. The Pi has two test ports TP1 & TP2 – these are to check the voltage being supplied to the board. There are mutterings about voltages under 5volt providing unexpected behavior on some boards.

I found that my white iPhone/iPod power supply (Rated @ 5V 1A dropped to about 4.8v when the Pi is running with HDMI, SD Card & USB WiFi Dongle.

Apple (A1205) Drops to about 4.8V under load

My HTC charger (Rated @ 5V 1A)performed about the same – around 4.8v under load

HTC (TC P300) Drops to around 4.8V under load

Another generic branded “Switching power supply” that was also rated @ 5V 1A showed the same voltage drop to around 4.8V under load.

Enter the Samsung Galaxy Tab 5V 2A charger, this bad boy kept me running at 5V under load.

Samsung (ETA-P10X) Keeps pushing 5V under load

The general consensus is that a 5V 1A phone charger should be fine, but if you are planning on plugging things into the USB port (WiFi / Storage etc) then you would be probably best off getting a higher rated PSU. I am going to check out Jaycar for a regulated 5V 2A supply next. Your results may vary, I didnt experience any strange issues or performance problems when running of any of the listed PSUs – but possibly got more interface drops on the USB WiFi adapter (thats a subject for another blog post).

On the subject of power – having such a tiny / portable device is much more useful when you can take it with you away from a power point. From our local Aldi store, I picked up a “Tevion MPP 7400” This is a portable 7400mAh Li-Po Battery Pack. This little guy has two USB ports on it & will apparently provide up to 2.1A on one, or 1A each with both in use. Its primarily aimed at charging a smartphone on the go, but it works beautifully as a portable power supply for the Pi. I have not tested how long it will keep the Pi running, but I was playing on it for several hours without the pack dropping an LED on the power meter.

Battery Pack – providing 4.78V under load – just within the allowable range – so far no problems, but we will see how it goes.

Well, that’s it for now, my Pi lives and breathes (as much as a piece of electronic equipment can) – time to try out some more distros & “projects” with it.





IPv6 Static Address on Ubuntu

27 04 2012
So – I have blogged about how to enable IPv6 on your firewall & setup your tunnel, and how to manually add addresses to an ubuntu server, but what about the server you are sticking on the end of the tunnel permanently – you want it up every reboot.
I have an Ubuntu box sitting on 2001:470:489e::100. This hosts http://public6.blackundertone.com & also my mail host mail.blackundertone.com
Most modern distro’s will have IPv6 enabled out of the box & it will do its best to grab an address. I didnt want autoconfiguration to hand any old address to it (even with SLAAC using the MAC address) to this host – so I could properly setup inbound & outbound FW rules.
You can turn it off by entering the following in /etc/sysctl.conf & reboot
– Disable the autoconf / SLAAC capability for all interfaces

net.ipv6.conf.eth0.autoconf=0

– Ignore the RA messages from your router

net.ipv6.conf.eth0.accept_ra=0

If you just want to test it out – or dont want to reboot your machine

sudo sysctl -w net.ipv6.conf.eth0.autoconf=0
sudo sysctl -w net.ipv6.conf.eth0.accept_ra=0

–BEFORE with autoconfigured Global IPv6 address–
eth0      Link encap:Ethernet  HWaddr 00:50:56:a1:70:d1
          inet addr:10.0.1.100  Bcast:10.0.1.255  Mask:255.255.255.0
          inet6 addr: 2001:470:489e:0:250:56ff:fea1:70d1/64 Scope:Global
          inet6 addr: fe80::250:56ff:fea1:70d1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:56 errors:0 dropped:12 overruns:0 frame:0
          TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6219 (6.2 KB)  TX bytes:7140 (7.1 KB)
–AFTER only link-local address remains–
eth0      Link encap:Ethernet  HWaddr 00:50:56:a1:70:d1
          inet addr:10.0.1.100  Bcast:10.0.1.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fea1:70d1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:254 errors:0 dropped:12 overruns:0 frame:0
          TX packets:237 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:24646 (24.6 KB)  TX bytes:33280 (33.2 KB)
Now – its simply another couple of lines in your /etc/network/interfaces file & a quick network restart
iface eth0 inet6 static
        address 2001:470:489e::100
        netmask 64
        gateway 2001:470:489e::1
and your shiny new STATIC ASSIGNED IPv6 address is active
eth0      Link encap:Ethernet  HWaddr 00:50:56:a1:70:d1
          inet addr:10.0.1.100  Bcast:10.0.1.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fea1:70d1/64 Scope:Link
          inet6 addr: 2001:470:489e::100/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:806 errors:0 dropped:116 overruns:0 frame:0
          TX packets:716 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:71814 (71.8 KB)  TX bytes:110482 (110.4 KB)
Apache & Postfix should already listen on any IPv6 addresses – so simply restart the services.




IPv6 rebooted – web & smtp server

14 03 2012

Now that I had a new IPv6 allocation from tunnelbroker.net – it was time to get the server re-addressed & reachable from the outside world.

Apache was already configured to listen on all IPv4 & IPv6 addresses so all I needed to do was change the address, test connectivity & restart apache

sudo ip addr add 2001:470:489e::100/64 dev eth0
sudo route –inet6 add default gateway 2001:470:489e::1
ping6 2001:470:489e::1

Dont forget to update your nameserver

sudo vi /etc/resolv.conf
ping6 ipv6.google.com

Restart apache & postfix services

sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 start
sudo /etc/init.d/postfix stop
sudo /etc/init.d/postfix start

Update your DNS record with the new address & test connection.
You can either test from another IPv6 connected host (like a VPS)

ash@vertex:~$ dig aaaa public.blackundertone.com +short
2001:470:489e::100
ash@vertex:~$ curl public.blackundertone.com

Or use one of the many publicly available test servers – like http://ipv6-test.com/validate.php

Its as simple as that. Now my server was once again reachable via IPv6 – all this effort to get back to where I was.

Next time – I cover the DNS forward & reverse fun as well as why I needed to transfer my domain from namecheap.com free DNS hosting to the free DNS hosting provided by Hurricane Electric @ dns.he.net