Reply
Thread Tools
Posts: 14 | Thanked: 2 times | Joined on Jan 2009
#1
Hi All,
I have problem with forwarding internet in n810. The setup is this,
Tablet1 is connected to internet through usb net to a ubuntu laptop.
Tablet1 has established ad-hoc connection through the iwconfig commands.
Tablet2 has static ip address and is connected to Tablet1's ad-hoc network.
The problem is Tablet2 does not have access to internet. I tried with NAT but I think they are not supported in 0s2008. I have no idea as to what I should do. Any tips or pointers will be very helpful.
Thank you
 
Posts: 10 | Thanked: 2 times | Joined on Nov 2008
#2
It would be easier if we knew what tablet's you are using. You stated that you have an N810, is that the one forwarding the internet or the one you wish to receive it with?
 
Posts: 14 | Thanked: 2 times | Joined on Jan 2009
#3
Hi
Thanks for da response. I have 2 n810. One is connected to my laptop thru usb net and is able to access internet thru the usb net. It is also establishing an ad-hoc network. The second n810 is connected to the first n810 thru the first one's ad-hoc network (the second n810 has static ip address). The internet access is not available in the second n810.
 
tz1's Avatar
Posts: 716 | Thanked: 236 times | Joined on Dec 2007
#4
I assume both tablets have static IPs on the same network, e.g. 192.168.5.5 and 192.168.5.6 or something similar? Do a "netstat -r" in an xterm to see how it is trying to route things. You might need to do "route add default gw <usb n810 wifi IP>" on the remote tablet and "route add default gw <pc usb IP>" on the usb connected one. Also try pinging between to see if you have a connecton (you might need rootsh).
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#5
You need to install a few kernel modules and some iptables extensions to get NAT to work.

The kernel modules are here:

http://my.arava.co.il/~matan/770/netfilter-diablo.tgz

The iptables extensions are in a package called iptables-ext that is available from maemo extras repository.
 

The Following 7 Users Say Thank You to Matan For This Useful Post:
Posts: 14 | Thanked: 2 times | Joined on Jan 2009
#6
Hey thanks a lot for the response. i will try your suggestions and will get back.
 
Posts: 6 | Thanked: 0 times | Joined on Jan 2009
#7
Hi,

I also want to get NAT working on my tablet.

I've got my tablet and PC hooked up with the USB cable, and I'm running ethernet over USB there.

My tablet is online via wifi, and my laptop isn't. I've been running privoxy on the tablet so I can browse on my PC, but I'd like to get NAT working, so I can use other protocols, direct ssh, etc.

Thanks for the kernel modules and libs! I tried those, and loaded all the modules.

I don't understand much about iptables, so I googled for tutorials. I tried to follow this: http://www.revsys.com/writings/quicktips/nat.html which basically says to do this:

echo 1 > /proc/sys/net/ipv4/ip_forward

/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

/sbin/iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT

/sbin/iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT


but on the n810 it wouldn't take the --state arg. I could run it without the -m state and --state options, but I don't think that works... Do I need another kernel module for state? Or should I be doing totally different iptables commands to set up NAT?

I tried all that stuff, but without the state options, and I don't get any response when I try to ping through it, or ssh through. here's my iptables -v -L:

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
2 168 ACCEPT 0 -- usb0 wlan0 anywhere anywhere
0 0 ACCEPT 0 -- wlan0 usb0 anywhere 192.168.2.0/24


Thanks!

Edit: oh, I added the -d 192.168.2.0/24 later, that didn't seem to help either.

Last edited by JasonWoof; 2009-01-28 at 23:24. Reason: forgot one detail
 
Posts: 14 | Thanked: 2 times | Joined on Jan 2009
#8
Thanks Matan but wen ever i reboot the device, nat is not workin and i've to insmod again...am i makin a mistake or is there any other way to do it????
 
Posts: 6 | Thanked: 0 times | Joined on Jan 2009
#9
ajay2music,

What commands do you use to set up NAT?

I got the kernel modules installed fine. But got an error when trying to do the iptables commands I've done on ubuntu.

Thanks, - Jason
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#10
Originally Posted by ajay2music View Post
Thanks Matan but wen ever i reboot the device, nat is not workin and i've to insmod again...am i makin a mistake or is there any other way to do it????
The modules need to be inserted after a reboot, and the iptables commands need to run. You can do it automatically by putting the commands in the file /etc/init.d/local.sh and making sure
there is a symbolic link /etc/rc2.d/S90local -> ../init.d/local.sh.
 

The Following User Says Thank You to Matan For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 12:28.