In other words, I want to share one internet connection between 2 computers (both running Puppylinux) via ethernet ports.

How do I connect the laptop to the desktop? That is, how do I set up the IP addresses for the laptop-to-desktop connection in the Internet Connection Wizard on the Desktop? Same question for the Laptop? Static IP addresses? What IP addresses should I choose?

Ok I'm assuming you don't have a router as you would not be asking this....

I used static addresses as this avoids setting up dchp.
192.168.1.xxx is a common choice... so in your case say 192.168.1.2 and 192.168.1.3.
As you are using static the laptop will need a nameserver...you should be able to use the address from the sharing machine from /etc/resolv.conf.

the commands to enable internet sharing are

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward

ppp0 may need to be changed depending on your internet connection...ifconfig should help decide what is used or even just from the setup wizard.

If the above works ok then you can add those 2 lines to /etc/rc.d/rc.local

Adapter connected to main internet cable - settings given to you by your ISP ( IP, Netmask, Gateway, DNS )

Adapter connected to the second PC through a crossover cable:
IP - 192.168.0.1
Netmask - 255.255.255.0
Gateway - 0.0.0.0 (it is very important that you DO NOT leave this field blank; even if Windows assigns 0.0.0.0 automatically for blank entry, I see that Mandriva assigns a wrong address that does't work)

Next, go to "Share internet connection with other local machines" and select the card connected to internet. Then NEXT, a few services have to be installed, you will be asked for installation CDs (not sure which of these services are vital for connection sharing so I installed them all).

Yes, I found that the Desktop DNS parameters in Internet Connection Wizard were already Primary: 209.18.47.61 and Secondary: 209.18.47.62. And the same numbers were in /etc/resolve.conf on the Desktop. Do I type those IP addresses into the Laptop's Internet Connection Wizard under Static IP in the boxes for DNS parameters?

Do I type in the 'iptables' and 'echo 1 ...' commands on the Desktop or the Laptop? I tried typing them on the Desktop. The commands seemed to work (I got back to the prompt). But the Desktop and Laptop still don't communicate.

I typed the ifconfig command on the Desktop and got 'Eth1' and 'lo' as the names? of the 2 ethernet ports? I am trying to connect to the laptop via the ethernet port called 'eth0' in the Desktop's Internet Connection Wizard. So do I need to change ppp0? to what?

I went the URL you provided. The discussion is so hard to decypher that I will try to do so after considering your other solutions first.

Puppylinux does not have any of those 3 menu items you list. So, I translate those 3 steps to mean 'Internet Connection Wizard' on puppylinux. That wizard has the name 'Connect' on the puppylinux desktop.

I typed in the IP addresses that you suggested into the puppylinux Internet Connection Wizard on the Desktop for the ethernet port connected to the laptop. I got the error message "Your Gateway 0.0.0.0 is not on the network. (You may have entered your address, gateway or netmask incorrectly.)"

And puppylinux does not have a "share internet connection with other local machines" choice in the start Menu.

Yes, I found that the Desktop DNS parameters in Internet Connection Wizard were already Primary: 209.18.47.61 and Secondary: 209.18.47.62. And the same numbers were in /etc/resolve.conf on the Desktop. Do I type those IP addresses into the Laptop's Internet Connection Wizard under Static IP in the boxes for DNS parameters?

yes..one or both of them...connecting via the lan card in the wizard on the laptop.
The internet should be transparently passed through hence the need to give a nameserver.

Quote:

Do I type in the 'iptables' and 'echo 1 ...' commands on the Desktop or the Laptop? I tried typing them on the Desktop. The commands seemed to work (I got back to the prompt). But the Desktop and Laptop still don't communicate.

in a terminal...sounds like you did that anyway...there should be no response except the prompt.

Quote:

I typed the ifconfig command on the Desktop and got 'Eth1' and 'lo' as the names? of the 2 ethernet ports? I am trying to connect to the laptop via the ethernet port called 'eth0' in the Desktop's Internet Connection Wizard. So do I need to change ppp0? to what?

this is something I'm unclear on...how is your internet connection made? Does whatever you used mention ppp0 or eth1 or something else?..from what you say it could be eth1 instead of ppp0 for the command...

Also can you ping (desktop address) from the laptop. I assume you have made a static connection for the desktop lan card to laptop.

mike

edit one other thought..if you have a dsl modem with ethernet connection then the desktop will be given an ip (inet: from running ifconfig)...this has to not be the same as the network setup between machines..ie if 192.168.1.n then your link needs to use 192.168.2.n.
Another point for static the netmask is normally 255.255.255.0.

1) On the Desktop computer, open the Internet Connection Wizard (='Connect' on the puppylinux 'desktop').
2) Choose 'Connect to Internet by Network Interface'
3) Choose E'netPort1.
4) Choose Static IP
5) Note the DNS primary and secondary IP addresses
6) Close 'Connect'
7) Open 'Connect'
Choose E'netPort2.
9) Choose Static IP
10) Choose an IP address for the first box labeled IP Address. I suggest 192.168.0.1
11a) Choose netmask = 255.255.255.0
11b) make the gateway box blank, not 0.0.0.0 or anything else
11c) make sure the primary and secondary DNS IP addresses are the ones you noted above. they will probably be that by default.
11d) close 'Connect'.

On the laptop computer, open 'Connect' as above.
12) Choose an IP address for the first box labeled IP Address. I suggest 192.168.0.2
13) Choose netmask = 255.255.255.0
14) Choose for the Gateway IP address the address of the Desktop. if you followed my suggestion, it will be 192.168.0.1
15) Make sure the primary and secondary DNS IP addresses are the ones you noted above. they will probably be that by default.
16) Close 'Connect'.

That is all for the setup of the connection over the crossover ethernet cable.

Now you need to adjust the firewall on the Desktop.
1) In 'Setup' (on the puppylinux 'desktop'), choose 'Setup a firewall'.
2) Choose 'custom installation'
3) Choose the services that you want to be used by the laptop. I don't recall exactly, but I think I chose ftp, http, auth, and a few others.
4) Click ok
5) For each service that is presented to you (they are the ones you chose, I think), specify that IP address 192.168.0.2 can access it, assuming you took my suggestion above
6) Then setup will ask if you have a private network. say yes and input the name of E'NetPort2 (in my case it was 'eth0')
7) I think that it asks if there is any other network. say no.
Complete the firewall setup.

That should do it!!

In your browser on the laptop, you should not specify any proxy. Instead specify 'direct internet connection'.

Mike and Master_Wrong, thanks for the help. Master_Wrong, I choose 192.168.0.1 and 2 because of your help. Some other IP addresses I chose did not work without an error message.

Also, I found that when setting up the firewall on the Desktop, you don't need to specify any services for the Laptop to access other then 'ssh', which is the default. If you then just specify that you have a private network on E'NetPort2, it will work. That way anyone who happens to have IP Address 192.168.0.2 on the internet will not have access to those other services on your computer.

I use to have this working easily with Firestarter and Linux Mint. But the present 5.2.8 Lucid Firestarter 2.0 rc9 is different with no SIMPLE GUI.
So seems to have to manual edit file /etc/rc.d/rc.firewall

Internet Connection Sharing on Puppy Linux using Firestarter Firewall.
from https://help.ubuntu.com/community/Internet/ConnectionSharing/
from http://jorgenmodin.net/index_html/archive/2008/11/13/how-to-do-internet-connection-sharing-on-linux/view
from http://www.fs-security.com/docs/connection-sharing.php

Run FireStarter to have it build the default files
Menu --> Network --> FireStarter

Use this as a guide to the individual commands
http://www.cyberciti.biz/faq/linux-configure-a-static-ip-address-tutorial/
http://www.linuxforums.org/forum/ubuntu-linux/125639-howto-internet-connection-sharing-ubuntu-server-puppy-linux-client.html

I am working out how to do this internet connection sharing, so check back and add your thoughts as to what worked for you. Fred

DO NOT USE. REFERENCE ONLY ShareInternet2.2.4 contains a dnsmasq version.
install dnsmasq 2.51 from Puppy Package manager. Which needs DBUS and LIBDBUS1.2.16 packages also, plus upstart and upstart-job then try again.
to use dnsmasq

Fred
ps. Firestarter worked like a golden charm in Mint LInux 8. So burn a CDROM for Mint Linux 11 that is equivalent to Lucid Lynx Ubuntu 10,
and play with that as a Live CD and see if you can EASILY make the Firestarter work to share your Linux Connection with other machines.Last edited by WB7ODYFred on Mon 30 Jul 2012, 04:44; edited 1 time in total

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