Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 31 Oct 2014, 01:12
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Network
shareInternet-2.2.5.pet - Puppy as router - bugfix
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 6 of 8 Posts_count   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Author Message
Unreal.2K7

Joined: 01 Feb 2011
Posts: 2

PostPosted: Thu 21 Apr 2011, 13:24    Post_subject:  

Well, thanks anyway. I managed to solve the problem by installing an hardware Access Point on my network.
Back to top
View user's profile Send_private_message 
walrus

Joined: 23 Jun 2011
Posts: 2

PostPosted: Thu 23 Jun 2011, 20:39    Post_subject:  

hello,
thanks for this program! i have it doing 95% of what i need Smile but i have some slight issues, and im not sure if it is with the program per se, or because i am a noob at iptables.

my setup is as follows

Code:

internet----->wireless router-------->laptop running puppy --->server

where the laptop connects to the router over wifi, and is crossover cabled to the server.

basically, i want the laptop to relay everything from the server to the router and vice versa, except port 5900 so i can vnc into the laptop to make changes as needed. the iptables firewall is just in the way other than for that purpose. i dont need the security behind the router already, and i would rather deal with the port forwarding only there.

i thought i had fixed this by port forwarding every port besides 5900 from the laptop to the server with something like:
Code:

iptables -I FORWARD 1 -d [server IP] -o eth0-j ACCEPT
iptables -t nat -A PREROUTING -p tcp -d [laptop wifi ip] --dport 1:5899 -j DNAT --to [server ip]:1-5899
(another set that runs ports from 5901-65535, and both of those repeated for udp)

just to be sure, i also set the default policy for all chains to ACCEPT, and removed the DROP statements at the end of each chain.

this seems to do an ok job. from outside (over the internet) i can connect to the server with RDP, and my web pages are available again (yay!). i also can vnc into the puppy laptop. i cannot however access the server via ftp, nor can the server UPNP ports on my router. i have a vpn software called hamachi that relies on opening up random udp ports, and they never make it to the router. in fact, when i am on another machine on my routers lan, i STILL cannot connect directly to the server. (it gets relayed to a server that himachi runs as a backup)

the only time these problems occur is when i have screwed up the networking in the past. i am suspect of the job i did, or perhaps there is an issue with the "double nat" i dont know. any help or hints would be much appreciated.

thanks
walrus
Back to top
View user's profile Send_private_message 
gyro

Joined: 28 Oct 2008
Posts: 497
Location: Brisbane, Australia

PostPosted: Tue 05 Jul 2011, 09:27    Post_subject:  

Sorry for not replying sooner, I've been away.

walrus wrote:
when i am on another machine on my routers lan, i STILL cannot connect directly to the server.
NAT causes a problem with access from the local Lan, but it can be fixed with a couple of rules in iptables. Unfortunately I can't remember them right now, so I will do a bit of research and reply again.

In the mean time, a question:
Which iptables rules did you change?

gyro
Back to top
View user's profile Send_private_message 
gyro

Joined: 28 Oct 2008
Posts: 497
Location: Brisbane, Australia

PostPosted: Wed 06 Jul 2011, 03:00    Post_subject:  

walrus,

Just two things:

1) To access the server from the internet, use the Internet IP address of wireless router.
To access the server from the local lan, use the local lan IP address of the laptop running puppy.

2) To use the firewall built into shareInternet:
Download the attached file and extract the single file "aDedicatedServer".
Edit the file and replace "10.10.10.10" in the line:
Code:
SERVER_IP=10.10.10.10
with the actual IP address of your server.
Copy the file into the directory "/root/.shareInternet/iptablesExtraRules/"
Run shareInternet.

gyro

EDIT: uploaded new version of file, this should be correct one.
aDedicatedServer.gz
Description  extra iptables rules for your server - version 2
gz

 Download 
Filename  aDedicatedServer.gz 
Filesize  234 Bytes 
Downloaded  736 Time(s) 
Back to top
View user's profile Send_private_message 
kidsafighting

Joined: 11 Jun 2008
Posts: 6

PostPosted: Thu 21 Jul 2011, 22:22    Post_subject: Thanks for all your work
Sub_title: Terrific tool
 

I just wanted to say thanks for developing this pet. I had a p4, 256meg ram. wifi laptop with a bad hard drive controller. I was not sure what to do with it.
An old 512meg flash drive, puppy 5.1 and this program brought it back to life as a wireless router that I use for a lan connection for desktops I work on.
Excellent work and many thanks.
Back to top
View user's profile Send_private_message 
Atle

Joined: 19 Nov 2008
Posts: 286
Location: Oslo, Norway

PostPosted: Tue 02 Aug 2011, 20:08    Post_subject: Your Pet is nominated for QuickPet in Lucid 5.2.6  

Still i admit its not been tested yet, as I do not have two PCs at the moment.

Can anyone please check if it works in 5.2.6?

http://murga-linux.com/puppy/viewtopic.php?t=69563&start=1140

The nominee list is here http://privat.schoolux.org/index.php/lucid-526

Forum thread here:http://murga-linux.com/puppy/viewtopic.php?t=70450
Back to top
View user's profile Send_private_message Visit_website MSNM 
blindsound

Joined: 16 Jul 2012
Posts: 4

PostPosted: Mon 16 Jul 2012, 22:37    Post_subject: from 3g to ethernet  

Hi,
I'm trying to share my 3g modem connection with ethernet port (connected to linksys wifi).

I'm not shore what i'm missing on the sharing part, i did try the same thing using a mac computer and work great. Try again with puppy and got stuck.

Is there any way I can check if internet is really sharing? Did try to connect directly to another computer (no linksys wifi, just ethernet from port to port) and couldn't get any connection shared.

I try using Firewall installer and "shareInternet" (got the green light) but internet is not being shared.

I will really appreciate any help.
Back to top
View user's profile Send_private_message 
WB7ODYFred


Joined: 13 Dec 2008
Posts: 104
Location: Oregon & Washington

PostPosted: Sat 21 Jul 2012, 01:15    Post_subject: testing connection for Internet Sharing? Ping your computr
Sub_title: I also suggest running shareInternet twice more, Stop & Start
 

Ping your Computer to test connectivity between Computer Interfaces.
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]
Quote:
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:
drwxr-xr-x 2 root root   180 2012-07-25 17:12 shareInternet


Here is a sequence of Shell Commands that work for me on PuppyLinux.


    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

1. Start Sharing Internet
2. Stopped Sharing Internet (id Flushes out old rules from iptables which maybe causing your source of problems with NOT SHARING! )[/list]
Code:
/sbin/iptables -L -v -n –line-numbers

    3. Start Sharing Internet (initializes IPTABLES with the rules)

Code:
/sbin/iptables -L -v -n –line-numbers
echo 1 > /proc/sys/net/ipv4/ip_forward


4. From the Server Box, Ping the Puppy Linux box (check ethernet cable / hub is connected)
Quote:
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!)

This command exercises the DNS (Domain Naming Service) Look Up from servers outside the PuppyLinux box and the local server box.

Phil Chen has an example of using RAW iptable commands to perform the port forwarding.
http://www.philchen.com/2011/06/21/how-to-port-forward-using-netfilteriptables

Quote:
*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


Google is your friend. Good Luck searching and reading.
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:
tar xvf  shareInternet-2.2.4.pet
Then read and study the shell script files.
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
test_share_internet.tar.gz
Description  test_share_internet.sh bash shell script
test_share_intrnt_output.txt output from test script before and after running shareInternet
shareinternet_image.png Green Dot over shareInternet ICON
shareinternet_image_off.png NO Green Dot over shareInte
gz

 Download 
Filename  test_share_internet.tar.gz 
Filesize  34.41 KB 
Downloaded  690 Time(s) 
shareInternet_image.png
 Description   ShareInternet_image.png with the Green Dot
 Filesize   15.09 KB
 Viewed   2401 Time(s)

shareInternet_image.png


Edited_times_total
Back to top
View user's profile Send_private_message 
blindsound

Joined: 16 Jul 2012
Posts: 4

PostPosted: Tue 24 Jul 2012, 18:03    Post_subject: Great!  

Thanks for the reply Fred !
I'm facing some issues with the computer holding Puppy, so my tests are suspended at the moment.
As soon as I solve it, I will follow you steps.
Thanks again!
Back to top
View user's profile Send_private_message 
aarf

Joined: 30 Aug 2007
Posts: 3620
Location: around the bend

PostPosted: Mon 06 Aug 2012, 11:48    Post_subject:  

havent read the thread through.
want to put these link here for cross reference and so i dont lose this thread when i finally get my new equipment. was worried about getting the right driver for the hostapd pet.
dont know if it is a driver problem with shareinternet.pet for wifi hotspot.

http://www.murga-linux.com/puppy/viewtopic.php?t=68127
http://www.murga-linux.com/puppy/viewtopic.php?t=68045

_________________

ASUS EeePC Flare series 1025C 4x Intel Atom N2800 @ 1.86GHz RAM 2063MB 800x600p ATA 320G
_-¤-_

<º))))><.¸¸.•´¯`•.#.•´¯`•.¸¸. ><((((º>
Back to top
View user's profile Send_private_message Visit_website 
gyro

Joined: 28 Oct 2008
Posts: 497
Location: Brisbane, Australia

PostPosted: Tue 21 Aug 2012, 09:18    Post_subject:  

Useful things to know about shareInternet.

1) Do NOT use it in conjunction with any "firewall" software, including puppy's own.

Why is it so?

shareInternet does not need to be configured with the 2 network interfaces, it works them out itself,
including which one is the upstream interface and which is the downstream interface.

This is so it can be used just as easily to share a PPP connection over wired ethernet,
as to share a wired ethernet over wifi, or wifi over wired ethernet.

But, this requires the names of the appropriate connections to be reflected in the iptables rules used as the firewall.
So shareInternet generates it's own iptables rules, after it works out which interfaces to use.

2) The other most likely problem with running shareInternet, is configuring the downstream interface.

shareInternet can work it all out provided there are 2 and only 2 active interfaces,
one of which is correctly configured as an upstream interface and the other correctly configured as a downstream interface.

upstream requirements:
Normal client network interface, usually configured using dhcp.

downstream requirements:
Usually this interface is configured statically.
Define an IP address and subnet-mask, in a different subnet from the upstream interface.
i.e. if the upstream network is 192.168.1.0 then choose something like 192.168.2.1 as the IP address of the downstream interface.
Neither a Gateway nor DNS should be supplied for this interface.
The classical network wizard allowed you to do this. Some of the newer network configuration utilities will not.

3) shareInternet can not have driver problems. It is just a script that works out what needs to be done, then runs appropriately configured standard software, in an appropriate manner.

4) If I remember correctly, the pet contains a "dnsmasq" binary. If it does, it might be appropriate to replace it with a newer version.

gyro
Back to top
View user's profile Send_private_message 
Atle

Joined: 19 Nov 2008
Posts: 286
Location: Oslo, Norway

PostPosted: Wed 05 Sep 2012, 06:55    Post_subject:  

Gyro...

What is your opinion on level of difficulty to use ShareInternet and Hostapd, as for sharing a mobile internet connection by using your built in Wlan card(if supported by Hostapd)

I find ShareInternet one of the most inventive Pet's and must say its been REALLY useful and also is a great showcase for Puppy technologies.

Atle
Back to top
View user's profile Send_private_message Visit_website MSNM 
gyro

Joined: 28 Oct 2008
Posts: 497
Location: Brisbane, Australia

PostPosted: Mon 10 Sep 2012, 10:19    Post_subject: hostpad?  

Atle,

Thanks for your kind words.

Sorry that I haven't replied earlier; I don't look in this forum very often these days.

As to Hostpad and ShareInternet, it should not be a problem so long as Hostpad always runs first.
Since ShareInternet's only requirements are 2 active interfaces with IP addresses, 1 of which must have a gateway defined. ShareInternet should not care if wifi interface is a normal client or an AccessPoint. Just remember that if wifi is the downstream interface then it should have a statically defined IP and no gateway defined (since it is the gateway for all downstream devices).

Gyro
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Fri 14 Dec 2012, 01:45    Post_subject:  

I've been working on a "web accelerator" and ad blocker app (started out of frustration with webpage lockups on waiting for ajax.googleapis.com and kindof exploded as I considered the possibilities)
http://murga-linux.com/puppy/viewtopic.php?t=82639
I was wondering if modification of /etc/hosts or /etc/resolve.conf affected the internet sharing.

For instance, does Pup-advert-blocker block ads on the shared connections?

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
gyro

Joined: 28 Oct 2008
Posts: 497
Location: Brisbane, Australia

PostPosted: Mon 07 Jan 2013, 08:51    Post_subject:  

technosaurus wrote:
For instance, does Pup-advert-blocker block ads on the shared connections?
If the downstream computers use "dhcp" to configure their network, then "dnsmasq" on the sharing computer will be their dns server. So any changes on the sharing machine that get seen by dnsmasq will affect the dns results for downstream computers.
So, the real answer to your question is in the dnsmasq doco.

However if the downstream computers set their own dns server IP address, then the sharing computer can have no influence on their dns responses.

Once the downstream computers start sending packets to outside IP addresses, only the firewall rules can make a difference.

Gyro
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 6 of 8 Posts_count   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Network
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1423s ][ Queries: 13 (0.0373s) ][ GZIP on ]