IP Masquerading

IP Masquerading

Post by Olivier Gaumon » Fri, 03 May 2002 11:26:20



Hi,
I read the IP Masquerading HowTo and tried to set it up an my Linux box (Red
Hat 7.1 and kernel 2.4.x)

With the rc.firewall-2.4 test file everything works as long as I'm using the
Linux Box.  However after the Linux box has been inactive for a couple of
minutes masquerading doesn't work anymore.  Everything comes back if I
re-run the script (/etc/rc.d/init.d/firewall-2.4).  It's very annoying to
re-run the script every 5 minutes!  A reboot also arrange things but only
for a couple of minutes.

I'm a beginner but I think I have followed carrefully every steps in the
HowTo.  I really don't know what to do to trace my problem.  Anyone has an
idea?

Thanks

Olivier

 
 
 

IP Masquerading

Post by Jeroen Geilma » Sat, 04 May 2002 05:16:40


Somewhere around Thu, 02 May 2002 04:26:20 +0200, Olivier Gaumond was seen
engraving on a handy slab of granite:

Quote:> Hi,
> I read the IP Masquerading HowTo and tried to set it up an my Linux box
> (Red Hat 7.1 and kernel 2.4.x)

> With the rc.firewall-2.4 test file everything works as long as I'm using
> the Linux Box.  However after the Linux box has been inactive for a
> couple of minutes masquerading doesn't work anymore.  Everything comes
> back if I re-run the script (/etc/rc.d/init.d/firewall-2.4).  It's very
> annoying to re-run the script every 5 minutes!  A reboot also arrange
> things but only for a couple of minutes.

The RedHat distro's normally load additional modules dynamically,
additional modules being those that are not loaded on startup (via
rc.sysinit & the runlevel scripts) - and it sets them to "autoclean", i.e.
when they aren't used for 1 minute or so they are unloaded.

Do a "lsmod" to see which modules have the autoclean flag set, if any of
them are iptable_* or ipt_* (* meaning anything) then that's what happens.

You can override this in the script which loads the modules for the
firewall (there are quite a few of those) on the commandline, try a "man
insmod" for details.

HTH

--
Confusion is my middle finger.

 
 
 

IP Masquerading

Post by Olivier Gaumo » Mon, 06 May 2002 06:24:34



> The RedHat distro's normally load additional modules dynamically,
> additional modules being those that are not loaded on startup (via
> rc.sysinit & the runlevel scripts) - and it sets them to "autoclean", i.e.
> when they aren't used for 1 minute or so they are unloaded.

> Do a "lsmod" to see which modules have the autoclean flag set, if any of
> them are iptable_* or ipt_* (* meaning anything) then that's what happens.

> You can override this in the script which loads the modules for the
> firewall (there are quite a few of those) on the commandline, try a "man
> insmod" for details.

> HTH

You were right, some module were autocleaned.

I add some lines to load them manually in the firewall script, however
I still get the same trouble.

Any other idea?

Olivier

 
 
 

1. IP Masquerading works, but does not masquerade from within the local network

I've got a box running Redhat 6.1 working as a gateway for our home network.
It's connected to a cable modem, and we've only got one IP address, so it's
doing IP forwarding and masquerading for us.

Now, consider this situation: I've got a webcam running on one of my windows
boxes, whose IP address is 192.168.0.1 (for instance). The webcam is on port
8888, and I've got the linux box set up to forward this port along from
port, say, 9999, using a line much like

ipmasqadm portfw -a -P tcp -L xxx.xxx.xxx.xxx 9999 -R 192.168.0.1 8888

in my rc.local.

This works very well for people connecting in from outside - they'd use a
URL like:

http://xxx.xxx.xxx.xxx:9999/video/frame

but if I try and use that URL from inside the local network, it doesn't
connect, I'd have to use:

http://192.168.0.1:8888/video/frame

which is rather annoying as it makes it difficult to test things (I have to
VNC out to work and boot up a browser there)

I'm fairly sure the problem isn't with the webcam software - I've had the
same problem when trying to connected to an apache server inside the network
as well.

any ideas?

cheers,

Tim


2. Network card configuration

3. IP MASQuerading NOT Masquerading?

4. Time comparissons

5. Visually impaired software

6. Backup scripts, IP firewalling and IP masquerading

7. How to update a dynamic dns

8. IP NAT and IP Masquerading

9. IP-Chains vs. IP-Masquerade

10. IP Masquerade , IP Chains

11. proxy route gateway ip masquerading ip chains ?

12. IP masquerading wint RH 5.2 multiple IP