Connecting Two Computers

mazdaracer plug-discuss@lists.plug.phoenix.az.us
Thu, 18 Jul 2002 10:12:07 -0700


I use Mandrake distro 8.1. You should be able to use a 'control center'
if your distro has it to set up connection sharing. I ended up
purchasing a dial up router eventually for my setup from ebay. A Netgear
router.

As one poster mentioned, the IP should be on the private realm of IPs,
usually 192.168.x.x, where x = 1-254. Netmask 255.255.255.0.
[192.168.0.1 & 192.168.0.2 as simple as that] Here's a sample firewall
script that was included on my distro:

#!/bin/sh
# Load the NAT module (this pulls in all the others).
modprobe iptable_nat

# Turn on IP forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward

# In the NAT table (-t nat), Append a rule (-A) after routing
(POSTROUTING)
# which says to MASQUERADE the connection (-j MASQUERADE).
/sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE

# Allows forwarding specifically to our LAN
/sbin/iptables -A FORWARD -s 192.168.0.0/24 -j ACCEPT

# Allow dhcp requests
/sbin/iptables -A INPUT -i eth1 -p udp --sport bootpc --dport bootps -j
ACCEPT
/sbin/iptables -A INPUT -i eth1 -p tcp --sport bootpc --dport bootps -j
ACCEPT
/sbin/iptables -A INPUT -i eth1 -p udp --sport bootps --dport bootpc -j
ACCEPT
/sbin/iptables -A INPUT -i eth1 -p tcp --sport bootps --dport bootpc -j
ACCEPT

# Allow dns requests
/sbin/iptables -A INPUT -i eth1 -p udp --dport domain -j ACCEPT
/sbin/iptables -A INPUT -i eth1 -p tcp --dport domain -j ACCEPT


Don't want to confuse the issue too much, but I think I did :) Check out
the documentation you for your distro.

pete


Clayton Stapleton wrote:
> 
> I have read the following dealing with networking and TCP/IP:
>         Network Administrators Guide
>         Running Linux
>         Networking-Overview-HOWTO
>         Net-HOWTO
>         Ethernet- HOWTO
>         Home-Networking-mini-HOWTO
>         ssh-HOWTO  (CSUA.Berkeley)
>         ssh man pages
> 
> None of these covers what I am trying to accomplish. One computer is
> connected to the internet with a modem that uses a dynamic IP. This computer
> is connected  to a second computer using a crossover cable and an
> ethernet card in each. I can ping between the two and ssh host to the other
> one, so I know they are functioning in that respect.
> 
> I have assigned IP addresses for the two computers. Whether or not  they
> are correct or not I no not know.
> 
> I would like to use the computer without  the modem on the internet by
> utilizing the modem on the other system. I have not read how to accomplish
> this from all that  I have read. There are other uses that have been hinted
> at by the things that I have read on this list. It would help if there was a
> USER'S GUIDE for something like this so that people like me would be able to
> do some of them.
> 
> Clay Stapleton
> Scottsdale, Arizona
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
> 
> PLUG-discuss mailing list  -  PLUG-discuss@lists.plug.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss