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 Sun 20 Apr 2014, 12:43
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Network
shareInternet-2.2.4.pet - Puppy as router - bugfix
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 8 [108 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Author Message
01micko


Joined: 11 Oct 2008
Posts: 7547
Location: qld

PostPosted: Mon 23 Feb 2009, 15:54    Post subject:  

Hey gyro

SMB (Pnethood) is working fine.

Only native file sharing is broken (scanning) I'll test manually.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
jaymac407

Joined: 01 Feb 2009
Posts: 2

PostPosted: Thu 26 Feb 2009, 17:08    Post subject:  

Is it possible to do port routing?

For example, Puppy's Internet IP is 192.168.1.2 and I want it to forward port 8080 to 192.168.3.2 (My computer's IP by Puppy)

Is this possible?


THX!
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7547
Location: qld

PostPosted: Fri 27 Feb 2009, 01:35    Post subject:  

01micko wrote:


Only native file sharing is broken (scanning) I'll test manually.


Yep, fine manually. I can put up with that! The pros far outweigh the cons...

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
gyro

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

PostPosted: Fri 27 Feb 2009, 22:29    Post subject:  

jaymac407 wrote:
Is it possible to do port routing?
Yes.
Use the "iptables" utility to add extra functionality to the firewall. Google "iptables".

gyro
Back to top
View user's profile Send private message 
gyro

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

PostPosted: Tue 03 Mar 2009, 06:14    Post subject:  

jaymac407 wrote:
For example, Puppy's Internet IP is 192.168.1.2 and I want it to forward port 8080 to 192.168.3.2 (My computer's IP by Puppy)
Try something like the following:
Code:
iptables -A PREROUTING -t nat -p tcp -d 192.168.1.2 --dport 8080 -j DNAT --to 192.168.3.2:8080
iptables -I FORWARD 2 -p tcp -d 192.168.3.2 --dport 8080 -o ${INSIDE_DEVICE} -j ACCEPT
# This rule helps the "I can't reach my web server from the inside" problem.
#iptables -A POSTROUTING -t nat -p tcp -d 192.168.3.2 --dport 80 -s 192.168.3.0/255.255.255.0 -j SNAT --to 192.168.1.2
You woud need to replace "${INSIDE_DEVICE}" with the name of you inside interface, e.g. eth1
Or you could just omit "-o ${INSIDE_DEVICE}" from the second line.

Note: The above is based on code from the "floppyfw" project.

gyro
Back to top
View user's profile Send private message 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Tue 17 Mar 2009, 22:34    Post subject:  

Internet connection sharing has been a "holy grail" for many people for quite some time. This actually seemed promising because it had a gui, and it said it works with wireless, but it seems to lack instructions. I tried for two hours without success to get it to "work". Gyro, if you know how to do this, its only half the story, actually making it work easily is the rest!

I wanted to forward an internet connection from my wireless adaptor (wlan0) on my laptop out of the ethernet port. I was using a crossover ethernet cable to attach from the laptop to the computer it was being shared to, but I suppose I could have used a switch, router and normal cables. On the host computer I want to be able to attach easily, preferably via dhcp (autodetect through the network wizard).

Would you post step by step instructions on how to do this? Including how to get the interfaces "up" (cant they be brought "up" automatically via the program?).

The other use for this program would to be able to effectively turn the puppy p.c. into a wireless router, taking a wired ethernet internet connection and turning into a wireless "hotspot" that clients can connect to via dhcp. This would add a major blindspot in puppy's current useability, that would take very little space.

If this were made simple and easy, I for one would push very hard for its inclusion in mainstream puppy linux. Thank you for your work so far.

Ecomoney

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
01micko


Joined: 11 Oct 2008
Posts: 7547
Location: qld

PostPosted: Tue 17 Mar 2009, 23:35    Post subject:  

Rob,
I think this may be a case of RTFM! There is a readme.

I connected my old 486 thru my machine which is on my wireless network easily. Your machine with the 2 interfaces, assign a static IP to the ethernet interface, then try.

Cheers

Mick

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 7547
Location: qld

PostPosted: Wed 18 Mar 2009, 00:11    Post subject:  

Rob

I just installed shareinternet on my 4.2 machine and am now posting on my 486. The slowest part was waiting for the 486 Smile .
Step by step
1) Install shareinternet, don't touch it!
2)Go to internet wizard, choose LAN, eth0 (or whatever your ethernet card is)
3) configure a static IP of 192.168.x .1 making sure x is differrent from the wireless interface, subnet 255.255.255.0, ALL OTHER FIELDS BLANK.
3)Save
4) click on ~/MyRoxApps/Shareinternet. A box will pop up. Choose the wireless interface, a big green dot will appear on the icon. Do not try to configure a firewall or anything.
5) On the client machine, run network wizard as usual, choose automatic IP and you are done!

Cheers.

Mick

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Wed 18 Mar 2009, 02:25    Post subject:  

I have found the holy grail!!!!

Many thanks Micko, you have succeeded in showing me something I have been trying to achieve for years.

I assumed I would have to set up my wireless connection first, which is open and able to connect via dhcp. I chose a static i.p. of 192.168.2.1 for my ethernet, as my wireless (wlan0) was given 192.168.1.12. I also had to right click the shareInternet icon in /root/my-roxapps which brought up a right-click menu...this is where I found the manual (the readme file), and also the "configure sharing internet" option which brought up the dialog box. I was a bit confused here, so I guessed and chose the "wlan0_eth0" option...and I must have guess right.

I read the readme file...once I found it.....for a bit, but it made my head spin. Do we really expect new linux users to wade through that, when the operation is so much simpler in Windows? Dont get me wrong...this is the only thing that works for puppy I have seen in 4 years of using it (including the built in puppy firewall wizard, which says it can share the internet but doesnt), so I am grateful at least for that.

Its possible to tell via the thread hit rankings what a popular feature this would be if puppy included it. Because I havnt (until now Micko) found a definitive solution I can only assume a lot of people (like me) decided it was impossible and either switched distro, or went out and bought a £50 router.

It there a way that this program could detect if an internet connection was already set up, and via which interface? It could then find out what I.P address number the x in 192.168.x.1 was (see above) and increment it by 1, and set up the outbound port with a static ip automatically?

Also how would I use this to work the other way around, i.e. connect to the modem via a ethernet cable, and create a wireless hotspot using a common garden usb wireless adaptor (I believe this is call a "peer-to-peer" wireless network) that could be attached to via a laptop with built in wireless or a pcmcia or usb adaptor? I darnt touch the current setup in case I cant get it working again.

This would make so much "old junk" so much more useable, and save a lot of people money if it worked easily.

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
01micko


Joined: 11 Oct 2008
Posts: 7547
Location: qld

PostPosted: Wed 18 Mar 2009, 02:36    Post subject:  

Hey Rob

Glad you got her going!
Quote:
t there a way that this program could detect if an internet connection was already set up, and via which interface? It could then find out what I.P address number the x in 192.168.x.1 was (see above) and increment it by 1, and set up the outbound port with a static ip automatically?


Well a fairly simple script should do itm I might even do that as a side project, and my buddy Trio will surely help!
Quote:
Also how would I use this to work the other way around, i.e. connect to the modem via a ethernet cable, and create a wireless hotspot using a common garden usb wireless adaptor (I believe this is call a "peer-to-peer" wireless network) that could be attached to via a laptop with built in wireless or a pcmcia or usb adaptor? I darnt touch the current setup in case I cant get it working again.


Easy, exactly the same way... The one you click is your connection to the internet.... no matter the signal source. Even better, you don't have a peer to peer network, you have a router, an address assigning router with dhcp server, neat eh? Theoretically you could piggy back unlimited networks!

Cheers

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Wed 18 Mar 2009, 03:17    Post subject:  

Quote:

PostPosted: Today, at 6:36 am Post subject:
Hey Rob

Glad you got her going!
Quote:
t there a way that this program could detect if an internet connection was already set up, and via which interface? It could then find out what I.P address number the x in 192.168.x.1 was (see above) and increment it by 1, and set up the outbound port with a static ip automatically?


Well a fairly simple script should do itm I might even do that as a side project, and my buddy Trio will surely help!


That is good to know, and if you have the skills it would be a very worthwhile use of your time. Perhaps also when the icon is clicked upon, it might run a quick test to see if there is internet connectivity already present ("ping www.google.co.uk"?), and if not offer to run the internet connection wizard to set it up ("exec /usr/sbin/net-setup.sh"...see I am not a total "noob", although I may feel it sometimes.) Clicking the icon again would then show a list of ports (minus the one that the web was currently connected by) that the user would wish to share out the connection via. If this were a list of interfaces in the machine, with a tick box next to each one, then it would be possible to to share the internet from a wireless (or cable) to any number of wired and wireless interfaces....so this could make puppy into a wireless repeater too.....am I getting ahead of myself here? I have wanted a skilled coder to address this for so long. Embarassed

I hope you get the picture, it offers so many more possiblities for reuse. Many thanks for your help micko.

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
01micko


Joined: 11 Oct 2008
Posts: 7547
Location: qld

PostPosted: Wed 18 Mar 2009, 04:02    Post subject:  

I'm not much of a coder! Laughing But we are Puppy! I'll write a basic script with gui over the next week or two including your suggestions (they were on my mind anyway Wink ) and when I get something going, I'll start a thread, maybe even gyro will jump on board. I'm sure more devs will come on board, that's how it works around here! Smile

How about "PInternet-Sharing"? hehe!

Cheers

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
gyro

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

PostPosted: Wed 18 Mar 2009, 08:40    Post subject:  

Hi,

Sorry for the absence, I thought I had been keeping an eye on things, but obviously not.

ShareInternet doesn't attempt to touch the interfaces, since it's designed to work with any two interfaces in any direction. So it looks for any two useful interfaces, either ppp0 or interfaces with ethernet encapsulation. Once it has found two and only two active interfaces, it asks the user to say which one is the "internet/upstream" one. The easiest way to be agnostic about which interfaces to use, is to do nothing until two are provided.
When it's starting it attempts to guess which configuration to use based on the two interfaces provided. In my machine I have "ppp0_eth0" and "ppp0_wlan0" configured. I bring up either the ethernet or wireless interface with a static definition, then attach my 3G mobile phone, and "dial" to produce ppp0, then start ShareInternet, and it automatically chooses the appropriate config to use.

Process:
1) Using the network wizard, get your upstream/internet interface active using dhcp.
2) Using the network wizard, get you downstream interface active using a static configuration.
3) Run ShareInternet.
4) If it asks you which interface is the Internet one, click on the interface you setup in 1)

Actually attempting to guess which is the Internet interface, could try the following:
a) If ppp0 is one of the interfaces, then it is most likely the Internet one.
b) The interface that connects to the network that contains the default gateway, is very most likely the Internet interface. This should be discern-able from the output from " iproute | grep default | cut -d' ' -f5".
Hm, if the above two rules do not produce the correct result, then there's a good chance that the configuration won't work anyway.

Interesting, thanks for stimulating this idea.
I'll look at a new version of ShareInternet that implements a) and b) above. I'll most likely chuck out the whole concept of storing configurations altogether, including the configuration dialog. ShareInternet will just keep on complaining, with hopefully meaningful error messages, until it gets two interfaces that should work. Doing a "ping" to a well known server might be the final test.
I'll get to it as soon as I've gotten my current project to a working version.
But I have no intention of ShareInternet actually controlling any interfaces. The Puppy network wizard, plus rc.network, plus "StoredNetConfigs" should provide all that's necessary to manage the interfaces.

Producing good documentation is always the hardest part.

gyro
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7547
Location: qld

PostPosted: Wed 18 Mar 2009, 08:59    Post subject:  

gyro,

Thanks for your response mate.

What ecomoney wants and what I reckon can be done with some good bash should give puppy a good reliable ICS alternative.

Cheers

Mick

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Wed 18 Mar 2009, 10:14    Post subject:  

Quote:
What ecomoney wants


It isnt just me I assure you! This has been one of the most asked for requests by new users on the forum.

Like I say, if the program were to check for internet connectivity to start with, it could pretty much guess at the interface that the internet connection was needed to be served out via. If there was no connectivity then it would start the internet connection wizard.

If the "outgoing" interface was a wireless device (I dont know how this is checked for, but the current internet connection wizard has code for it), then an additional dialog would be needed for the user to insert wireless parameters (SSID, possibly encryption etc) to create the "hotspot". I cant see anyone wanting to "dish out" their internet connection, from whatever source, by any other method than either an ethernet port or a wireless device.

I know "incoming" and outgoing dont "technically" apply, but they help describe the process. Smile

Quote:
But I have no intention of ShareInternet actually controlling any interfaces. The Puppy network wizard, plus rc.network, plus "StoredNetConfigs" should provide all that's necessary to manage the interfaces.


On a technical level your completely correct Gyro (thanks for looking over this), but "isnt working" and "cant be got to work without spending hours RTFM'ing" will amount to the same thing for people without your level of networking knowledge. To be useable it needs to be simple, and just do the work in the background, how it does that could be in the readme if people are interested. It should bring all the interfaces up and assign i.p. automagically, so people can *just get their computer working* and read about the details when they have to.

Like I say, this is a huge blindspot in functionality in the current puppy linux, and has been for some time.....you wouldnt want 100mb puppy not to be able to do something as easily a windows would you?? Twisted Evil Wink

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Display posts from previous:   Sort by:   
Page 2 of 8 [108 Posts]   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:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


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