112
Chapter 9. Setting Up a Red Hat Enterprise Linux LVS Cluster
iptables
/sbin/iptables -t mangle -A PREROUTING -p tcp \
-d
n.n.n.n
/32
\
--dport 21 -j MARK --set-mark 21
/sbin/iptables -t mangle -A PREROUTING -p tcp \
-d
n.n.n.n
/32 \
--dport 10000:20000 -j MARK --set-mark 21
In the above
iptables
commands,
n.n.n.n
should be replaced with the floating IP for
the FTP virtual server defined in the
VIRTUAL SERVER
subsection of
Piranha Config-
uration Tool
. These commands have the net effect of assigning any traffic addressed to the
floating IP on the appropriate ports a firewall mark of 21, which is in turn recognized by
IPVS and forwarded appropriately.
Warning
The commands above take effect immediately, but do not persist through a reboot of the
system. To ensure network packet filter settings are restored after a reboot, see Section
9.5
Saving Network Packet Filter Settings
Finally, you need to be sure that the appropriate service is set to activate on the proper
runlevels. For more on this, refer to Section 8.1
Configuring Services on the LVS Routers
.
9.5. Saving Network Packet Filter Settings
After configuring the appropriate network packet filters for your situation, save the settings
so they get restored after a reboot. For
iptables
, type the following command:
/sbin/service iptables save
This saves the settings in
/etc/sysconfig/iptables
so they can be recalled at boot
time.
Once this file is written, you are able to use the
/sbin/service
command to start, stop,
and check the status (using the status switch) of
iptables
. The
/sbin/service
will
automatically load the appropriate module for you. For an example of how to use the
/sbin/service
command, see Section 8.3
Starting the
Piranha Configuration Tool
Ser-
vice
.
Finally, you need to be sure the appropriate service is set to activate on the proper runlevels.
For more on this, see Section 8.1
Configuring Services on the LVS Routers
.
Summary of Contents for Cluster Suite
Page 1: ...Red Hat Cluster Suite Configuring and Managing a Cluster ...
Page 5: ...Index 165 Colophon 171 ...
Page 6: ......
Page 14: ...viii Introduction ...
Page 16: ......
Page 24: ...8 Chapter 1 Red Hat Cluster Manager Overview ...
Page 92: ...76 Chapter 4 Cluster Administration ...
Page 98: ......
Page 130: ...114 Chapter 9 Setting Up a Red Hat Enterprise Linux LVS Cluster ...
Page 152: ...136 Chapter 10 Configuring the LVS Routers with Piranha Configuration Tool ...
Page 154: ......
Page 162: ...146 Appendix A Supplementary Hardware Information ...
Page 180: ...164 Appendix C Multipath usage txt File for Red Hat Enterprise Linux 4 Update 3 ...
Page 186: ......