maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N810 (https://talk.maemo.org/forumdisplay.php?f=28)
-   -   Internet forwarding in N810 (https://talk.maemo.org/showthread.php?t=26090)

JasonWoof 2009-02-04 15:40

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

Matan 2009-02-04 16:09

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

JasonWoof 2009-02-04 16:30

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?

Matan 2009-02-04 16:52

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.

ajay2music 2009-02-10 22:47

Re: Internet forwarding in N810
 
Quote:

Originally Posted by JasonWoof (Post 262047)
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

My NAT commands are:
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!!!

JasonWoof 2009-02-11 05:14

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

ajay2music 2009-02-12 07:56

Re: Internet forwarding in N810
 
Quote:

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.

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

JasonWoof 2009-02-12 16:18

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

ajay2music 2009-02-19 17:04

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