LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Inetrnet connection sharing between a Slackware box and windows box (http://www.linuxquestions.org/questions/slackware-14/inetrnet-connection-sharing-between-a-slackware-box-and-windows-box-347539/)

planetsheinker 07-28-2005 01:37 AM

Inetrnet connection sharing between a Slackware box and windows box
 
I have a slackware box (that I managed to install after two days) and it has two NIC cards, and adsl modem connected to eth0.
I also have a windows box with one NIC card connected by a cable to the eth1 on the slackware box.
Now, I would like to share the internet connection the slackware box has with the windows box.
Can somebody please help me, or maybe direct me to the proper documentation?

curos 07-28-2005 03:14 AM

i'm no expert, (just started using linux like a month ago), but I just googled some stuff and came up with this:

http://en.tldp.org/HOWTO/IP-Masquerade-HOWTO/

Quote:

2.1. What is IP Masquerade?
IP Masquerade is a networking function in Linux similar to the one-to-many (1:Many) NAT (Network Address Translation) servers found in many commercial firewalls and network routers. For example, if a Linux host is connected to the Internet via PPP, Ethernet, etc., the IP Masquerade feature allows other "internal" computers connected to this Linux box (via PPP, Ethernet, etc.) to also reach the Internet as well. Linux IP Masquerading allows for this functionality even though these internal machines don't have an officially assigned IP address.
Quote:

2.3. Who Can Benefit From IP Masquerade?
  • If you have a Linux host connected to the Internet and..

  • if you have internal computers running TCP/IP connected that are connected to this Linux box via on a network, and/or

  • if your Linux host has more than one modem and acts as a PPP or SLIP server connected to other computers, and these machines do not have official or public assigned IP addresses (i.e. addressed with private TCP/IP numbers).

  • If you want those OTHER machines to communicate to the Internet without spending extra money to acquire additional Public / Official TCP/IP addresses from your ISP, then you should either configure Linux to be a router or purchase an external router.


here's how i found it by the way. google search for 'linux router' found a link to Linux internet connection sharing for your home network which then led to the IP MAsquerade howto

rkrishna 07-28-2005 03:19 AM

use samba
 
use samba using swat

http://127.0.0.1:901/swat/help/Samba-HOWTO-Collection/

http://www.oreilly.com/catalog/samba/

hope this help

b0nd 12-22-2005 08:39 PM

Quote:

Originally Posted by planetsheinker
I have a slackware box (that I managed to install after two days) and it has two NIC cards, and adsl modem connected to eth0.
I also have a windows box with one NIC card connected by a cable to the eth1 on the slackware box.
Now, I would like to share the internet connection the slackware box has with the windows box.
Can somebody please help me, or maybe direct me to the proper documentation?

Hello planetsheinker,
U didn't specified that has your problem been solved or not.
Me to have the same configuration of two systems as you have.
So if you are still in trouble then i could help you out.

regards

carboncopy 12-22-2005 08:55 PM

Use Network Address Translation (NAT).

planetsheinker 12-23-2005 02:19 AM

Quote:

Originally Posted by ruudra
Hello planetsheinker,
U didn't specified that has your problem been solved or not.
Me to have the same configuration of two systems as you have.
So if you are still in trouble then i could help you out.

regards

The problem was solved using http://www.fs-security.com/.
But I dont really like this solution :-(
So if you have a better one, I am all years :-)

b0nd 12-23-2005 09:35 AM

Quote:

Originally Posted by planetsheinker
The problem was solved using http://www.fs-security.com/.
But I dont really like this solution :-(
So if you have a better one, I am all years :-)

Its the only solution i know to provide the second machine internet connection through the first one as gateway.
I did this using Shorewall. B'coz the configuration files of shorewall will decide the way you are permitting the seocond machine to access the internet.

regards

otchie1 12-24-2005 04:30 PM

Simple is best.

Buy an external ADSL router with a LAN port - circa 30 quid. Configure it to act as a DHCP server and auto connect. Use NAT if you need certain services on a given machine.
Use a simple switch or hub to connect both PCs and the router together and Bob is your uncle.

Also makes it easy to expand the network at a later date.

MS3FGX 12-25-2005 01:13 AM

To route traffic between eth0 and eth1 (all traffic, no firewalling) simply put the following lines into a script:

iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward

Then have that script set to run at boot time.

combatbob 12-28-2005 10:55 PM

I have two boxes win/lin
 
My windows and Linux box have their own connection from a standard linksys 4 port router. How ever you can look in /usr/doc on your machine, and reference keywords and locate specific instructions for setting up Samba or server or Lisa etc. Hope this helps

combatbob 09-23-2006 11:53 PM

Router
 
Well I guess it wasn't much help, just thought having a router do the work instead of the system, less bog. Most routers today will do just what you want, generic loging routing etc. closing ports limiting access Isolating machines


All times are GMT -5. The time now is 02:45 AM.