#/bin/bash
ifconfig wlan0 up
iwconfig wlan0 essid "PePeNeTe"
iwconfig wlan0 key "0123456789"
iwconfig wlan0 channel 11
ifconfig wlan0 192.168.1.1 netmask 255.255.255.0
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -i wlan0 -o ppp0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -d 0.0.0.0/0 -j MASQUERADE
#!/bin/bash
iwconfig eth1 mode ad-hoc
iwconfig eth1 essid "PePeNeTe"
ifconfig eth1 up
ifconfig eth1 10.11.1.1 netmask 255.255.255.0
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.11.1.0/24 -d 0.0.0.0/0 -j MASQUERADE