I do just what you're asking about.

You should use your linux box as the gateway machine.

You could use your windows box as the gateway if you use winroute but it sux rox. I had files corrupted when I FTP'ed through a winroute gateway.

What you do is use one of the network addresses that is reserved for non-routed networks within your local LAN. For example, my machines have the IP addresses:

192.168.1.1
192.168.1.2
192.168.1.3
192.168.1.4

that way you don't have to apply to ICANN to get a network address, which they wouldn't give you anyway.

You will need to have a kernel with PPP enabled, and to configure PPP so it dials in and connects properly from the Linux box. You may want to use dial-on-demand, but maybe not if you're charged for your connect time.

Then my recommendation is that you run a 2.4 kernel and use iptables. You will need to enable some options in your kernel to use it. If you don't know how to build a kernel, maybe debian has a readybuilt kernel you can download with iptables enabled.

This rule, turned on in a startup script, will turn on IP Masquerading. You will want other rules for a complete firewall:

/etc/init.d/mymasq:
#!/bin/sh

case "$1" in
        start)
                modprobe iptable_nat
                iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
                echo 1 > /proc/sys/net/ipv4/ip_forward
        ;;
        stop)
                echo 0 > /proc/sys/net/ipv4/ip_forward
                iptables -t nat -D POSTROUTING -o ppp0 -j MASQUERADE
        ;;
esac

exit 0

Some howtos that are helpful:

http://www.tldp.org/HOWTO/Kernel-HOWTO.html
http://www.tldp.org/HOWTO/PPP-HOWTO/index.html
http://www.tldp.org/HOWTO/Firewall-HOWTO.html

It is not necessary to set up an HTTP proxy on your linux box, but it will help your performance if you do. It will also help your performance if you set up a caching nameserver, but again that is not necessary.

Mike
--
Michael D. Crawford
GoingWare Inc. - Expert Software Development and Consulting
http://www.goingware.com/
[EMAIL PROTECTED]

    Tilting at Windmills for a Better Tomorrow.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to