On Wed, 16 Aug 2000, Stephen E. Hargrove wrote:
> My server has two NICs, eth0 (192.168.1.1) and eth1 (192.168.1.10).
> eth0 connects to my private network and eth1 connects to the external
> DSL modem (Cayman 3220 DSL router).  .....
> However, I can't access it from any
> station on my network (i.e., from 192.168.1.1 or 192.168.1.6, etc.).

The short and ugly answer is:  Add the line
/sbin/arp -i eth0 -s 192.168.1.254 08:00:6A:2B:C6:2D pub
Where 08:00:6A:2B:C6:2D is the hardware address of your eth0 network
card.  Get the address by running /sbin/ifconfig

When one of your private machines tries to contact the router on its
ethernet interface, it consults its routing table.  They will find
that the router is within the same network, and will attempt to determine
its hardware address.  They'll send out arp packets asking "who has
192.168.1.254", and no one will answer.  

The above command (arp) will create a static, public arp entry in the
kernel's arp table.  When the machines in the private network ask "who has
192.168.1.254", the Linux machine will answer with its own hardware
address.  IP packets will be delivered to the Linux box and masqueraded
out to the router.

If it sounds ugly, then it is.

The correct answer is: use different IP networks for physical networks.

eth1 should probably use IP 192.168.1.1 and netmask 255.255.255.0.  This
will allow it to communicate with the router.

eth0 should use something like 192.168.2.254 and netmask
255.255.255.0.  All of your private machines should also use addresses in
the 192.168.2.0 network.  Their default gateway should be 192.168.2.254.

Set up this way, when the machines look up 192.168.1.254 in their routing
table, they will determine that it is not a local address, and will
send those packets to their default gateway, so that it can relay them.

MSG




_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to