[已软注销]对《Linux Firewalls》的笔记(1)
[已软注销] (Hello world)
-
Care and Feeding of iptables
有一个栗子:本机web服务器开在8080端口,需要将所有访问80的流量重定向到8080。使用以下命令: $ sudo iptables -t nat -A PREROUTING -p tcp --dport 8080 -j REDIRECT --to-port 80 但是本机访问localhost:8080似乎没有效果。结果开始怀疑iptables是否正确,开始怀疑自己。开始放弃学习iptables。千万别,你到别人机器上试试,见http://wiki.debian.org/Firewalls-local-port-redirection 里面有段话: To redirect locally generated packets, you must have the kernel option CONFIG_IP_NF_NAT_LOCAL set to Y. You will have to keep in mind, that without it, you will be unable to test this configuration from the localhost (meaning the computer where the redirection should take place) without special network setting (which is out of the scope of this document -- hint: a dummy module can help). 不知道其他发行版怎么样,反正我的ubuntu 13.04没开这个选项,估计所有发行版都没开这个选项。 这是个大坑啊,当年我就是因为这个不想学iptables的(当然是不知道原因的情况下)
[已软注销]的其他笔记 · · · · · · ( 全部82条 )
- 论美国的民主
- 1
- Big Debt Crises
- 1
- 论美国的民主
- 1
- The Defining Decade
- 1
- In The Plex
- 1
- Verbal Advantage
- 2
- Introduction to Algorithms (3/e)
- 1
- Merriam-Webster's Vocabulary Builder
- 1
- Programming Erlang, Second Edition
- 1
- Capital in the Twenty First Century
- 1
- Programming Clojure
- 1
- 编程珠玑
- 1
- 我们都要性小康
- 1
- Haskell趣学指南
- 1
- The Joy of Clojure
- 1
- 经济为什么会崩溃
- 1
- ZeroMQ
- 2
- 通往奴役之路
- 1
- The Datacenter as a Computer
- 1
- 国富论
- 1
- 构建高性能Web站点
- 1
- Programming Pig
- 1
- HTTP权威指南
- 1
- flex & bison
- 1
- Understanding the Linux Virtual Memory Manager
- 2
- The Little Book of Semaphores, 2nd Edition
- 2
- 依靠自我
- 1
- Operating Systems
- 9
- Structure and Interpretation of Computer Programs - 2nd Edition (MIT)
- 4
- Linux内核完全剖析
- 1
- TCP/IP基础教程基于实验的方法
- 1
- MongoDB
- 1
- 如彗星划过夜空
- 3
- Just for Fun
- 8
- 编译原理及实践
- 1
- TCP/IP详解 卷1:协议
- 1
- Coders at Work
- 4
- 什么是数学
- 1
- 那些忧伤的年轻人
- 3
- 我也有一个梦想
- 1
- 软件随想录
- 1
- Event Processing in Action
- 1
- FLEX 与 BISON(影印版)
- 1
- ANSI Common Lisp
- 1
- 黑客与画家
- 7
- 九型人格
- 1