BEFN$?FN Ask Klaus! 8JB BC8LJ

I attach the lspci details. The network- which should give an output like the fol- ing worked immediately, except for the lowing when WPA is operational and an annoyance of having to re-enter the IP address has been obtained: Klaus Knopper is the creator of password and type each session. Can you suggest anything I might do to make Selected interface 'eth1' and co-founder of the things better? bssid=00:01:02:03:1b:89 ssid=my_network LinuxTag expo. He currently Please check that the password id=0 /etc/wpa_ pairwise_cipher=CCMP works as a teacher, program- is correctly saved in supplicant/wpa_supplicant.conf, group_cipher=TKIP mer, and consultant. If you have and ensure that wpa_supplicant has key_mgmt=WPA2-PSK been automatically started once your wpa_state=COMPLETED a configuration problem, or if computer boots. ip_address=10.0.0.100 wpa_supplicant.conf you just want to learn more The entry in should be similar to Listing 1. N_pN`e[fnj6 about how works, send Some distributions set up wpa_suppli- In the September 2008 issue, cant via wpa_cli and entries in /etc/net- page 56, Klaus rhetorically asks your questions to: work/interfaces instead, but the basic why anyone would need Win- configuration idea is the same. wpa_sup- dows. I work for a company that uses klaus@linux-magazine. com plicant needs a while to authenticate, so VPN security to allow us to log in from maybe in your setup, the DHCP request home. This security package only runs just comes a little too early. on Windows XP (not earlier or later ver- To check on the WPA status, enter the sions) and is called SC_XP_2k_ngxR60_ following: hfa1.exe. Of course, this works in a vir- GXjjnfi[Kpg\ tual WinXP window, but this critical ap- I have had my IBM ThinkPad $ sudo wpa_cli status plication must have Windows. R50e for about three years, and I For those of us who cannot select the have been running Ubuntu Listing 1: /etc/ wpa_ software packages that big organizations Linux on it reasonably satisfactorily. supplicant.conf use, we are stuck with their choices.

Originally, I used Ubuntu 6.06 LTS and 01 ctrl_interface=/var/run/wpa_ These choices almost always mandate could only get the wireless networking supplicant Windows. In my case, it must be WinXP.

to work in open mode. 02 ap_scan=1

I now have Ubuntu 8.04 LTS installed 03 fast_reauth=1 My rhetorical answer would be:

and can use WPA2 with the password 04 “Why choose a proprietary VPN setting that my router requires. However, with an uncertain security level 05 network={ I have to set the network password type and uncertain future maintenance costs 06 scan_ssid=1 and password each time I switch the lap- over a standardized, open source solu- 07 # Use proto="WPA" to limit to top back on. The password type has WPA ONLY, "RSN" for WPA2 tion like OpenVPN or SSH?” changed from WPA2 to WPA and the I’m not attempting to discuss whether 08 ssid="your_wlan_network_name" number of password blobs has increased or not SC_XP_2k_ngxR60_hfa1.exe 09 psk="your_secret_wpa_password" from the correct 12 to more than will fit would run under Wine, because in my 10 } in the text box. opinion, it does not offer much advan-

60 ISSUE 97 DECEMBER 2008

060-062_ask-klaus.indd 60 16.10.2008 17:07:20 Uhr Ask Klaus! BEFN$?FN

tage using an open source operating sys- I know that “Lenny” sees my modem I’m describing two alternative configu- tem just as a loader for a proprietary but cannot get past this problem of con- rations here: One is via kppp, the graphi- software base. figuring it so that it actually works. I cal modem tool in KDE, and the second Of course, you are right: Often the have followed numerous online tutori- one is a plaintext configuration of wv- users are simply not allowed to make a als, only to be let down. Wvdial and dial. choice on their own, which is a problem Gnome PPP are equally unfriendly. My Don’t worry about the unknown that, sadly, has no technical solution. whole problem is probably between the login/password for authentication. Actu- chair and keyboard. ally, you don’t need them because your LJ9Df[\d Also, will future Knoppix distros pro- modem identifies you using the SIM card I am currently running Debian vide support for USB modems? number, so your Internet connection 4.0 “Etch” on a home-built PC gets charged to your phone bill. But be- (AMD Athlon, 1GB DDR RAM). Debian/ Knoppix, as well as all cause kppp demands a login and pass- I’m trying to connect to the Internet recent GNU/ Linux distributions, word, you can literally give both of them using a USB modem (Huawei E160G) in support USB modems. A USB as three. the UK. I have managed to load the driv- serial module called USBSerial works ers for the modem using dmsg and lsusb, with many devices that identify them- BgggJ\klg in conjunction with modprobe altera- selves as serial modems. Check with Kppp’s default setting (probably?) has a tions. However, when it comes to config- lsmod | grep usbserial for the presence of bug. In the Debian branches I tested in uring the modem using kppp, I need to this module once the modem has been the file /etc/ppp/peers/kppp-options, the provide usernames and passwords, plugged in, and check dmesg | grep tty- option noauth is commented out with a which my ISP tends not to supply, there- USB. If it doesn’t appear, try modprobe hash mark (#). For dialout, the option fore making it impossible to connect. usbserial as root. For your modem, the should be present, so please remove the I decided to install Debian 5.0 serial line autodetection seems to work, hash mark or add noauth to pppds stan- “Lenny,” which I found to be a lot better so /dev/ttyUSB0 is operational. dard options in /etc/ppp/options. This when it comes to hardware detection. The E160G is an UMTS modem, which option for pppd just means that the ad- Lenny sees my modem as a GSM means that the connection procedure is dress being connected to your modem is modem, without me making any altera- similar to dialing a provider’s number not required to authenticate itself, which tions. However, when I try to connect, I via phone line, except that some parts makes sense here because you are not am faced with similar unfriendliness re- have to be changed in the standard set- planning to let the modem log on to your garding kppp. ting of your modem program. computer, but you want to log on to the provider’s network instead. After fixing that, you need to tell kppp that your modem is actually connecting via UMTS or GPRS, which is an init

Listing 2: /etc/wvdial.conf 01 [Dialer Defaults]

02 Init1 = ATZ

03 Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

04 Init3 = AT^SYSCFG=2,2,3FFFFFFF,1,2

05 Init5 = AT+CGDCONT=1,"IP","3internet"

06 Modem Type = Analog Modem

07 Baud = 460800

08 New PPPD = yes

09 Modem = /dev/ttyUSB0

10 ISDN = 0

11 Stupid Mode=1

12 Phone = *99#

13 Password = three

14 Username = three

15

16 [Dialer 3g]

17 Init4 = AT^SYSCFG=14,1,3FFFFFFF,2,4

18

19 [Dialer gprs] =`^li\(1:fe]`^li`e^df[\dj\kk`e^jn`k_bggg% 20 Init4 = AT^SYSCFG=13,1,3FFFFFFF,2,4

DECEMBER 2008 ISSUE 97 61

060-062_ask-klaus.indd 61 16.10.2008 17:07:21 Uhr BEFN$?FN Ask Klaus!

string that has to be sent to the modem I have a 4GB (3950Kb or something) boot option home=/path/to/knoppix. before dialing. USB stick, and it is not big enough. It img). For your Internet connection, add bombs out with an error stating that In the case that the knoppix.img file is there is not enough space. What size present, but for some reason badly dam- AT+CGDCONT=1,"IP","3internet" stick do I need? I was under the impres- aged, you will get an error message such sion that this type of thing could be done as “cannot unite directories in as the Init2 string in the kppp Edit on a 1GB stick. /UNIONFS,” but the system should still Modem Commands options (Figure 1), work – somewhat. You can rename or which differs among different providers. The CD version of Knoppix is delete the defective image file. For UMTS or GPRS, the number to dial about 700MB, whereas the DVD Knoppix 4.x.x is quite old, which is always (without the “ATD” prefix) version is over 4GB. The CD ver- means that it will not recognize many *99# (including the asterisk and hash sion should fit on a 1GB stick. The DVD SATA controllers. If no knoppix.img is mark). Before your modem is ready to version requires a stick of around 5GB, present, this should not really cause an serve as a modem, you must unlock the so the closest common size available is error message like the one above, unless SIM for this session. To do so, you either probably an 8GB stick for the DVD ver- you have physical read errors, which can need to remove the PIN that protects the sion (which I frequently use for testing well be caused by SATA if the DVD drive SIM Card from unauthorized use, or USB boot compatibility). is connected to a SATA port and the cor- send the PIN once while the modem is Also, if you remaster the compressed responding driver puts the port in a plugged in. The modem command for files, please make sure the resulting size wrong mode. this purpose can be typed directly in the of a single file after compression does In this case, you cannot do much, kppp “terminal” that you can open in not exceed 4GB, because that is the max- other than wait for a new version with a the modem command window, imum file size supported by the FAT32 newer kernel, try boot options for dis- filesystem, which is usually used for abling DMA, or revert the port to com- AT+CPIN=1234 USB sticks. patible IDE mode in the BIOS settings of The same limit applies for a plain ISO your computer. where 1234 is replaced by your SIM’s 9660 CD-ROM/ DVD filesystem. Thus, to pin number. If you mistype the number, stay below this limit, the compressed >\kk`e^:fee\Zk\[ the modem will greet you with a “PUK files are split into two parts on the Knop- I need help because I’m a begin- Pin” instead of “SIM Pin” request, which pix DVD, then they are merged via ner with Linux. I have tried means you will have to unlock the SIM UnionFS/ AuFS during the boot process. Knoppix 5.3.1, but I cannot get with the much longer PUK that was pro- it to run on the Internet from one of the vided with your SIM Card. Failing au- J8K8?Xi[;i`m\ USB ports. (I have eight USB 2 ports.) thentication will result in the modem re- My desktop now has only a I don’t have an ethernet port on my sponding with something like “illegal SATA hard drive. It seems that computer, which is a Dell Inspiron 530 command” to every dial attempt. your UnionFS cannot be formu- with: Now you are ready to connect. You lated. In principle, your Live DVD system ฀ ฀฀฀฀ can save all settings in kppp; only the does not use any hard drive, but do you MT882, PIN command above must be typed each use a hard drive cache somewhere? ฀ ฀ time you remove and reconnect the Knoppix 4.x.x up to 5.3.1 all behaved ฀ ฀฀ modem from the computer’s power, un- the same. Any help you can give me will be greatly less you disable the PIN on your SIM appreciated. Card. In Knoppix, /UNIONFS is the di- rectory in which the read-only, The manufacturer does not Nm[`Xc compressed data meets the writ- seem to supply Linux drivers for An anonymous poster on the Ubuntu fo- able ramdisk, and (almost) all system di- USB mode, so my first choice rums at http:// ubuntuforums. org/ rectories are linked to this directory dur- would be to return the modem and get showthread. php? p=5569939 reports that ing the boot procedure. one that works. the / etc/ wvdial. conf entry shown in List- This arrangement is entirely indepen- My second choice would be to get a ing 2 worked for him. dent of any hardware, except maybe the network adapter and connect with your Note the different settings for fast CD- or DVD-ROM, which is expected to router via LAN – it saves you a lot of UMTS and the slower GPRS variant. Wv- be mounted at /cdrom. Knoppix does not headaches, and the router has a nice dial has to be started as root to fire up use the hard disk by default. web-based configuration interface that pppd after connecting. However, it is still possible to put a helps you set up the Internet connection knoppix.img file on a writable medium from Linux as well as Windows. Jk`ZbJZi`gk attached anywhere the kernel can find it, In the October 2008 issue of which can be a hard disk, USB-flash Linux Magazine, you told of the drive, or SD card. To store changes or Send your Linux questions to script to put Knoppix 3.5.1 onto updates permanently, this file can be klaus@linux-magazine. com. a USB stick. used instead of the ramdisk (Knoppix

62 ISSUE 97 DECEMBER 2008

060-062_ask-klaus.indd 62 16.10.2008 17:07:22 Uhr