MavEtJu's Distorted View of the World - 2011-01Back to index FreeBSD laptop as a Wireless Access Point for an iPhonePosted on 2011-01-12 18:00:00 Recently I was on a holiday where the provider of my iPhone had no signal, but where the provider of my 3G modem for the laptop did have a signal. At least my glass was half-full! In the past I have tried to setup Bluetooth between my laptop and my iPhone, and that resulted in a night of hard work and no effort. This time I tried a different approach: Instead of using Bluetooth for communication, I transformed the FreeBSD laptop into a wireless access point. The command to change the wireless card from a normal client to a wireless access point are: [~] edwin@lappie>cat wlan-iphone #!/bin/sh ifconfig wlan0 destroy ifconfig wlan0 create \ wlandev ath0 \ wlanmode hostap \ bssid \ authmode open \ ssid "My iPhone WiFi" ifconfig wlan0 up ifconfig wlan0 inet 10.0.0.1 netmask 255.255.255.0 sleep 1 sysctl -a net.inet.ip.forwarding=1 service isc-dhcpd restart Notes:
The 3G connection is setup via ppp(8) and to enable NAT on the outgoing packets, you need to enter the following command or add it to the right label in your ppp.conf: ppp ON lappie> dial Ppp ON lappie> PPp ON lappie> PPp ON lappie> Warning: 0.0.0.0/0: Change route failed: errno: No such process PPP ON lappie> nat enable yes PPP ON lappie> And to make sure that the connected clients get their IP address, you should run the ISC DHCP server with for example the following configuration: option domain-name ""; option domain-name-servers 8.8.8.8; default-lease-time 150; max-lease-time 300; ddns-update-style none; authoritative; log-facility local7; subnet 10.0.0.0 netmask 255.255.255.0 { range 10.0.0.10 10.0.0.99; option routers 10.0.0.1; } Notes:
Everything is working now, your glass is full again! :-) Show comment | Share on Facebook | Share on Twitter Buying Riverbed things on eBayPosted on 2011-01-10 23:00:00 Just for the fun of it, I checked out some Riverbed appliances and hardware on eBay.
So far no luck, still haven't been able to find a full working Steelhead appliance on eBay. Time to go to bed! |