![]() |
Internet forwarding in N810
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 |
Re: Internet forwarding in N810
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?
|
Re: Internet forwarding in N810
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. |
Re: Internet forwarding in N810
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).
|
Re: Internet forwarding in N810
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. |
Re: Internet forwarding in N810
Hey thanks a lot for the response. i will try your suggestions and will get back.
|
Re: Internet forwarding in N810
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. |
Re: Internet forwarding in N810
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????
|
Re: Internet forwarding in N810
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 |
Re: Internet forwarding in N810
Quote:
there is a symbolic link /etc/rc2.d/S90local -> ../init.d/local.sh. |
Re: Internet forwarding in N810
can someone please tell me what iptables commands to run? I can't figure it out, and I think there's at least two of you that could just paste that info here.
I very much appreciate the kernel modules, but unless I can find out how to get NAT with iptables without the state thing, I can't really use them. Thank you, - Jason |
Re: Internet forwarding in N810
If you want to use packet state, you need more kernel modules. I think this should be enough, but I am not sure:
http://my.arava.co.il/~matan/770/xt_state.ko |
Re: Internet forwarding in N810
Do I need state? I really don't know much about IP tables.
How are you doing NAT? ie what iptables calls are you doing? How should I do it? |
Re: Internet forwarding in N810
I think the two FORWARD lines are unnecessary. You only need the POSTROUTING lins, since the default policy for FORWARD chain is ACCEPT. But you need to use -o wlan0, not -o eth0, since you want to masquerade packets going out to the wireless interface.
|
Re: Internet forwarding in N810
Quote:
address 192.168.2.14 netmask 255.255.255.0 up echo 1 > /proc/sys/net/ipv4/ip_forward up iptables -P FORWARD ACCEPT up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.2.0/24 down echo 0 > /proc/sys/net/ipv4/ip_forward down iptables -t nat -F POSTROUTING hope this helps for you cos i'm unable to forward the packets even after i insmod the nat tables!!! |
Re: Internet forwarding in N810
Awesome, thanks for the info.
I'm leaning towards the theory that the modules don't work. I've lost some interest in this topic since getting online in a different way: I created an ssh tunnel to my tablet, and I'm running OpenVPN through that tunnel to my router box. This is obviously less flexible, as it only works in my house (because it requires the OpenVPN account on the router.) But it works for me, as I don't want to take this computer out of the house anyway. I think some day I might try compiling my own kernel modules, and see if I can get NAT working. But I'll probably put that off for a very long time... hopefully someone will get it working before I go to the bother :) Has anybody gotten the NAT working with the kernel modules posted earlier in this thread? If so I'd love to hear that, and also to know what commands you used to set up NAT. Thanks, - Jason |
Re: Internet forwarding in N810
Quote:
Jason the NAT modules wich matan provided r workin prop(in ma n810)...if ya have os2007 then try da maemo garage proj cos they've one for the NAT modules...if ya want any pointers for da NAT den lemme kno.... AJ |
Re: Internet forwarding in N810
ajay2music,
You got it working?! awesome. In your last post you said you couldn't get it to forward packets. What did you do differently to get it working? Thanks, - Jason |
Re: Internet forwarding in N810
when i tried pinging the host computer, the ping reaches it but since the computer was not configured for the route, the pong did not reach back the tablet. I added a route in the host and now i'm able to fowd the packets...
|
All times are GMT. The time now is 12:45. |
vBulletin® Version 3.8.8