Chapter 5. Testing IP Masquerade
Finally, it's time to give IP Masquerading an official try after all this hard
work. If you haven't already rebooted your Linux box, do so to make sure the
machines boots ok, executes the /etc/rc.d/rc.firewall-* ruleset, etc. Next, make
sure that both the internal LAN connection and connection of your Linux hosts
to the Internet is okay.
Follow these -11- tests to make sure all aspects of your MASQ setup is
running properly:
Step One: run the correct firewall for your machine via command
"/etc/rc.d/rc.firewall-[iptables / ipchains /ipfwadm]". For example, Linux
2.6 users would run "/etc/rc.d/rc.firewall-iptables"
Does it load with some strange errors? Here are some exmaples and help to fix
them:
Problem #1:
ip_tables, Using /lib/modules/2.4.2-2/kernel/net/ipv4/netfilter/ip_tables.o
/lib/modules/2.4.2-2/kernel/net/ipv4/netfilter/ip_tables.o: init_module: Device
or resource busy
Hint: insmod errors can be caused by incorrect module parameters, including
invalid IO or IRQ parameters
Run the command "/sbin/lsmod" and make sure the module "ipchains.o" is NOT
installed. If it is installed, your machine (most likely Redhat-7.x based)
is probably trying to load an IPCHAINS ruleset which is incompatible with
IPTABLES.
To disable this from happening in the future, run the command:
chkconfig --level=2345 ipchains off
To remove the "ipchains" module without rebooting, run the command:
/sbin/rmmod ipchains
and the re-try to load the rc.firewall-* ruleset.
Problem #2:
.
.
Creating a DROP chain..
iptables v1.2.3: log-level `info' ambiguous
.
.
Your version of IPTABLES it too old. You need to upgrade it with a newer
version via an updated RPM, DEB, or via compiling up the source. You can
get an updated version from your Linux distribution manufacturer or from
the NetFilter WWW site. This is all covered in the
Section 2.6 section.
Problem #3:
No such file:
Did you copy this rc.firewall-* file from a DOS machine?
Load the rc.firewall-* file in a binary editor such as ViM
(vim -b /etc/rc.d/rc.firewall-*) and make sure that every line is NOT
finished with a ^M.