132
Network
REDIRECT (NAT table only)
This target is only valid in the nat table, in the PREROUTING and OUTPUT chains, and
user-defined chains which are only called from those chains. It alters the destination IP
address to send the packet to the machine itself (locally-generated packets are mapped
to the 127.0.0.1 address). It takes one option:
How to configure it
The file with the iptables rules is
/etc/network/firewall
. The fwset script saves the
iptables rules in the file
/etc/network/firewall
(command iptables-save >
/etc/network/firewall
) and then save the file in the flash memory. The fwset restore
restores the iptables rules previously saved in
/etc/network/firewall
file (command
iptables-restore </etc/network/firewall
). This command is executed at boot to invoke the
last configuration saved.
VI method
Step 1 - Execute fwset restore.
This script will restore the IP Tables chains and rules configured in the
/etc/network/firewall
file. This script can be called in the process, whenever the
user wants to restore the original configuration.
Step 2 - Add the chains and rules using the command line.
See details of the iptables syntax earlier in this chapter.
Step 3 - Execute
iptables-save > /etc/network/firewall
.
This program will save all the rules and chains of all the tables in the
/etc/network/firewall
file.
Step 4 - Execute
updatefiles /etc/network/firewall
.
This program will save the configuration to the flash memory.
Target
Description
- - to-ports <port>[-<port>]
This specifies a range of source ports to use, overriding the
default SNAT source port-selection heuristics (see above). This
is only valid if the rule also specifies -p tcp or -p udp).
Table 4.14: Redirect target
Summary of Contents for AlterPath ACS
Page 16: ...xvi Table of Contents...
Page 29: ...13 This page has been left intentionally blank...
Page 30: ...14 Preface...
Page 68: ...52 Device Access...
Page 86: ...70 Authentication Step 5 Saving changes To save the configuration run the command saveconf...
Page 96: ...80 Authentication Save the configuration to flash 2 cli config savetoflash...
Page 114: ...98 Authentication...
Page 204: ...188 Administration To exit the CLI mode and return to ACS s shell issue the command cli quit...
Page 268: ...252 Power Management with AlterPath PM Integration...
Page 304: ...288 PCMCIA Cards Integration...
Page 338: ...322 Profile Configuration...
Page 364: ...348 Additional Features and Applications...
Page 376: ...360 Appendix A New User Background Information...
Page 406: ...390 Appendix C Cabling and Hardware Information This page has been left intentionally blank...
Page 418: ...402 List of Tables...
Page 420: ...404 List of Figures...