Книга: Iptables Tutorial 1.2.2
proc set up
proc set up
At this point we start the IP forwarding by echoing a 1 to /proc/sys/net/ipv4/ip_forward in this fashion:
echo "1" > /proc/sys/net/ipv4/ip_forward
Warning! It may be worth a thought where and when we turn on the IP forwarding. In this script and all others within the tutorial, we turn it on before actually creating any kind of IP filters (i.e., iptables rule-sets). This will lead to a brief period of time where the firewall will accept forwarding of any kind of traffic for everything between a millisecond to a minute depending on what script we are running and on what box. This may give malicious people a small time-frame to actually get through our firewall. In other words, this option should really be turned on after creating all firewall rules, however, I have chosen to turn it on before loading any rules to maintain consistency with the script breakdown currently used in all scripts.
In case you need dynamic IP support, for example if you use SLIP, PPP or DHCP you may enable the next option, ip_dynaddr by doing the following :
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
If there is any other options you might need to turn on you should follow that style. There's other documentation on how to do these things and this is out of the scope of this documentation. There is a good but rather brief document about the proc system available within the kernel, which is also available within the Other resources and links appendix. The Other resources and links appendix is generally a good place to start looking when you have specific areas that you are looking for information on, that you do not find here.
Note! The rc.firewall.txt script, and all other scripts contained within this tutorial, do contain a small section of non-required proc settings. These may be a good primer to look at when something is not working exactly as you want it to, however, do not change these values before actually knowing what they mean.
- Configuration options
- Initial loading of extra modules
- proc set up
- Displacement of rules to different chains
- Setting up default policies
- Setting up user specified chains in the filter table
- INPUT chain
- FORWARD chain
- OUTPUT chain
- PREROUTING chain of the nat table
- Starting SNAT and the POSTROUTING chain
- Setting up default policies
- SET TERM больше не нужен в isql
- Introduction to Microprocessors and Microcontrollers
- Chapter 8. Saving and restoring large rule-sets
- Kernel setup
- User-land setup
- Setting up user specified chains in the filter table
- Iptables-save ruleset
- Listing your active rule-set
- State NEW packets but no SYN bit set
- Using the kill Command to Control Processes
- Для чего нужны папки Windows, Documents and Settings, Program Files и Temp?