View Single Post
Posts: 355 | Thanked: 566 times | Joined on Nov 2009 @ Redstone Canyon, Colorado
#48
Originally Posted by zimmerle View Post
Hey guys i placed the iptables package on the extras-devel. Maybe it will be useful.
Cool! With my latest kernel with NAT and your iptables I was able to turn my N900 into a "wifi hotspot"!

Here's my quick & dirty script:

Code:
#!/bin/sh
# Run this script to share your Internet connection.
# Activate your gprs0 (fone data) connection with the GUI
# Then run this  :)

set -x

# insert masquerade module
sudo modprobe ipt_MASQUERADE

# flush old rules
sudo iptables -F
sudo iptables -t nat -F

sudo iptables -t nat -A POSTROUTING -o gprs0 -j MASQUERADE

# forward IPs
echo -n 1 | sudo tee /proc/sys/net/ipv4/ip_forward

sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode ad-hoc
sudo ifconfig wlan0 up
sudo iwconfig wlan0 essid freemoe
sudo ifconfig wlan0 10.0.0.22 netmask 255.255.255.0 up
 

The Following 12 Users Say Thank You to jebba For This Useful Post: