Subject: Wingate/IPFWADM

From: [email-masked] (Tim O'Brien)
Date: Thu, 1 Aug 1996 17:42:25 -0500

I would like to make my Linux box appear to the network like a gateway, sort
of like Wingate running on a 95 box. I've tried IPFWADM and had no success. 
Any ideas? Here's the general scenario.

        192.168.0.9 is the linux box, named CURLEY
        192.168.0.3 is a win95 box named CADZILLA
        192.168.0.4 is a win95 box named BLOO

        After Linux connects, a route for <my isp's gateway> is added in as 
        the default gateway. At this point PPP works on the Linux box to the 
        internet.

        IPFWADM is started using 
        ipfwadm -F -m -a accept -S 192.168.0.3/24 -D 0.0.0.0

        The 95 boxes are set up in the TCP/IP setup to use 192.168.0.9
        (curley) as a gateway. 

        On the 95 box, when I try to telnet to another known good host
        on the 'net, I get a connection failed: timed out message. 

At this point, I think I'm more than a little confused. Anyone ever gotten
ipfwadm to work? If so, do you have any idea what I'm doing wrong? Any help
would be greatly appreciated. 

Thanks, 
Tim

-------------------------------------------------------------------------
 < I am Pentium of Borg. Division is futile. You will be APPROXIMATED! > 
-------------------------------------------------------------------------
Email: [email-masked]

---

From: "Susan G. Kleinmann" <[email-masked]>
Date: Thu, 01 Aug 1996 21:33:52 -0400

Hi Tim --

I have succeeded in making ipfw going by doing 2 things:

1.  Set up ipfw in the kernel.

    To do this, I set these networking options (all other networking options
    were not set, i.e., their value=n).
    -----------
    CONFIG_EXPERIMENTAL=y
    CONFIG_NET=y
    CONFIG_FIREWALL=y
    CONFIG_NET_ALIAS=y
    CONFIG_INET=y
    CONFIG_IP_FORWARD=y
    
    CONFIG_IP_FIREWALL=y
    
    CONFIG_IP_MASQUERADE=y
    
    CONFIG_IP_ALWAYS_DEFRAG=y
    
    CONFIG_IP_ALIAS=m
    
    CONFIG_IP_NOSR=y
    CONFIG_SKB_LARGE=y
    CONFIG_NETDEVICES=y
    CONFIG_DUMMY=m
    
    CONFIG_PPP=m
    
    CONFIG_NET_ETHERNET=y
    CONFIG_NET_VENDOR_3COM=y
    
    CONFIG_EL3=m

    -----------
    I suspect I didn't have to set all of them, particularly
    CONFIG_NET_ALIAS, but setting it doesn't seem to hurt much.

2.  I have a line like yours in my /etc/ppp/ip-up script.  Mine says:

ipfwadm -F -a masquerade -P all -S 192.168.0.2/24 -D 0.0.0.0/0

where 192.168.0.2 is the IP address of my husband's Windows machine.
I suspect the differences between your line and mine don't matter very
much.

Other than that, all I had to do was to set up the appropriate 
databases on the Windows machine.

Then it just worked.  If this is any help, let me (really, the list)
know.  I think a lot of people are wondering how to do this.

Good luck,
Susan Kleinmann
[email-masked]

---

From: [email-masked] (Bernd Eckenfels)
Date: Fri, 2 Aug 1996 02:29:37 +0200 (MET DST)

>         ipfwadm -F -m -a accept -S 192.168.0.3/24 -D 0.0.0.0

You can manage this with two commands (one for each host):

"ipfwadm -F -a masq -S 192.168.0.3 -D 0/0"
"ipfwadm -F -a masq -S 192.168.0.4 -D 0/0"

or:

"ipfwadm -F -a masq -S 192.168.0.0/29 -D 0/0"
(will masquerade host 192.168.0.1-192.168.0.7)

You can look at the Rules with "ipfwadm -F -ln"

The -m Option is ONLY used to display the active connections, NOT for
setting a masquerade connection. The Default Destination must be given with
a /0 netmask, or masquerading will only be used if you try to connect to the
HOST 0.0.0.0.

Greetings
Bernd
-- 
  (OO)      -- [email-masked] --
 ( .. )  ecki@lina.{inka.de,ka.sub.org}  http://home.pages.de/~eckes/
  o--o     *plush*  2048/A2C51749  eckes@irc  +4972573817  *plush*
(O____O)       If privacy is outlawed only Outlaws have privacy