On Thu, 2003-07-17 at 00:29, L.V.Gandhi wrote:
> I have seen articles and how to for internet connection sharing. Any pointers 
> for modem of one machine being shared by other linux m/cs in a network.

If you already have the two machines networked together, all you have to
do is to implement a script using IPTABLES - it's really easy - you
DON'T have to have two NIC's or anything stupendous like that - and the
following is a script that I currently use for doing my "sharing":

----------------------------------------------------------

#!/bin/sh
# Begin of /usr/bin/start_ics

source /etc/init.d/functions

case "$1" in
    start)
        echo "Enabling masquerading..."
        echo "1" > /proc/sys/net/ipv4/ip_forward
#        evaluate_retval
        echo -n "Bringing up iptables..."
        iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
        ;;
    stop)
        echo -n "Disabling masquerading..."
        echo "0" > /proc/sys/net/ipv4/ip_forward
        evaluate_retval
        echo -n "stopping iptables ... "
        iptables -t nat -F
        evaluate_retval
        ;;
    restart)
        $0 stop
        /usr/bin/sleep 1
        $0 start
        ;;
    *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
esac

# End of /usr/bin/start_ics

----------------------------------------------------------

...so you can use it like "start_ics start" - works like a charm mate.
-- 
Thu Jul 17 11:25:01 EST 2003
 11:25:01 up 3 days,  3:28,  3 users,  load average: 0.45, 0.27, 0.24
-----------------------------------------------------------------
|            __    __          |kuhn media australia            |
|           /-oo /| |'-.       |http://kma.0catch.com           |
|          .\__/ || |   |      |================================|
|       _ /  `._ \|_|_.-'      |stephen kuhn                    |
|      | /  \__.`=._) (_       | email: [EMAIL PROTECTED] |
-----------------------------------------------------------------
  linux user #:267497 linux machine #:194239 * MDK 9.1+ & RH 9  
      Mandrake Linux Kernel 2.4.21-11mdk Cooker for i586
-----------------------------------------------------------------
 * This message was composed on a 100% Microsoft free computer *

The Golden Rule of Arts and Sciences:
        He who has the gold makes the rules.

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to