The Following User Says Thank You to therblack For This Useful Post: | ||
![]() |
2008-08-26
, 21:37
|
|
Posts: 3,397 |
Thanked: 1,212 times |
Joined on Jul 2008
@ Netherlands
|
#2
|
![]() |
2008-09-08
, 23:17
|
|
Posts: 880 |
Thanked: 264 times |
Joined on Feb 2007
@ Cambridge, UK
|
#3
|
I'm trying to build a small ad hoc network between my laptop (which connects to the internet) and my n800. I've got very close...all that remains is to add some encryption onto the laptop access point.
I'm going to list in detail what I did, just in case it helps anyone else:
On my laptop (running Ubuntu Hardy) I execute the following commands:
sudo iwconfig eth1 mode ad-hoc
sudo iwconfig eth1 essid "laptop"
sudo iwconfig eth1 key off
#sudo iwconfig eth1 key 53412
#sudo iwconfig eth1 key restricted
sudo /sbin/ifconfig eth1 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255 up
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
sudo iptables -P FORWARD ACCEPT
sudo iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24
On my n800, I've set up a network connection to "laptop" and specified the IP. That is, I've set
IP address: 192.168.0.2
Subnet mask: 255.255.255.0
Default gateway: 192.168.0.1
plus the appropriate Primary DNS address and Secondary DNS address that I copied from /etc/resolv.conf on my laptop.
Everything is great! I can link and browse happily.
What I'd like to do is add some encryption on the connection. I tried the commands (commented out above):
sudo iwconfig eth1 key 53412
sudo iwconfig eth1 key restricted
as well as
sudo iwconfig eth1 key s:53412
and changing restricted to open, but when ever I do this I cannot connect...or if I can (when using open encryption) I can't see the internet.
Any ideas? Thanks