List the IPTABLES to see what goes where??
For purposes of notation:
Internet<===>WiFi ath5k----Desktop----E'netPort1<==crossover ethernet cable===>Server(2nd desktop)
Internet<===>WiFi 192.168.1.9----Desktop----E'net 10.0.0.4<==crossover ethernet cable===> 10.0.0.40 Server(2nd desktop)
HERE IS the CONNECTIONS here.
1.) Wifi Card and one Ethernet card in PuppyLinux Box
2.)cable to [HUB] cable to [Server static 10.0.0.40]
192.168.1.9 (dhcp WIFI Ath5k card) <---> [PuppyLinux CoolPup Box] routing 10.0.0.4 (eht0) <----cable to switch/hub -----> [ switch/hub ]
<------- cable to server -----> [ 10.0.0.40 (eth0) Server set with static IP ] * router DHCP server is turned off (not needed)
This shareInternet app worked for me when I manually ran "AppNow"
I also used Rox-Filer to open diretory /root/my-roxapps/ and just clicked on the directory named shareInternet. It ran the script and placed a green dot over the shareInternet ICON. Now my internet was sharing/routing to the server at IP number 10.0.0.40
Code: Select all
drwxr-xr-x 2 root root 180 2012-07-25 17:12 shareInternet
- ifconfig ( List wired interface configuration)
iwconfig ( List wireless interface configuration)
route -n (what is the present route setup?)
ping -c 3 he.net (check that we can ping through Wifi to an internet address for Hurricane Electric in Fremont California. ie easy to type address)
- ifconfig eth0 10.0.0.4 netmask 255.255.255.0 up
ping -c 3 10.0.0.40 (check if I can ping the server at 10.0.0.40 through eth0 from PuppyLinux Box
2. Stopped Sharing Internet (id Flushes out old rules from iptables which maybe causing your source of problems with NOT SHARING! )[/list]
Code: Select all
/sbin/iptables -L -v -n –line-numbers
- 3. Start Sharing Internet (initializes IPTABLES with the rules)
Code: Select all
/sbin/iptables -L -v -n –line-numbers
echo 1 > /proc/sys/net/ipv4/ip_forward
This command exercises the DNS (Domain Naming Service) Look Up from servers outside the PuppyLinux box and the local server box.ping -c 3 10.0.0.4 (check cable is connected to Puppy Linux box)
ping -c 3 216.218.168.2 (Check if can ping "he.net" website )
ping -c 3 he.net (check if internet connection sharing is working!)
Phil Chen has an example of using RAW iptable commands to perform the port forwarding.
http://www.philchen.com/2011/06/21/how- ... eriptables
Google is your friend. Good Luck searching and reading.*Make sure the iptables service is started, then run the script
*Beware /sbin/iptables -F will flush your existing rules if you have any so make sure you run
/sbin/iptables -L -v -n –line-numbers and see. If you have any rules add them to the script.
*If you are using a different src and dst IP you will want to enable ip forwarding:
echo 1 > /proc/sys/net/ipv4/ip_forward
Well Minded search of Puppy Linux Forums!! Really Good Tool
http://www.wellminded.com/puppy/pupsearch.html
I worked this out for me. Tell / Share with others what worked for you.
"shareInternet" app uses linux shell scripts so will work on most any PuppyLinux version. It is not a binary file tied to ONE version of Linux. It might also work on other Linux Distributions if the script files are edited to match the proper DIRECTORY names for that Linux Distribution. Download and unpack with command
Code: Select all
tar xvf shareInternet-2.2.4.pet
I ran "firstTime" script to install shareInternet.
The test_share_internet.sh script basically runs the comand to list the IPTables from puppylinux acting as a router. you can see the ethernet eth0 port forwarded to the wifi wlan0 port.
Fred