问题描述与解决方案还是老问题,Linux系统中通过iptables配置的NAT无法在双向通信环境中使用,你无法配置一条NAT规则实现对两个方向主动发起的流量做NAT,解决这个问题的方案有好几种:1.配置两条NAT规则iptables的NAT配置本身就是先match再执行一个target,因此一条规则只能表示一种转换策略,要想实现“来自x的数据包的源地址转换为y,去往y的数据包的目标地址转为x”这样...
分类:
其他好文 时间:
2014-07-20 09:22:06
阅读次数:
294
一、设计原则
(1)减少内存碎片
(2)减少向操作系统申请内存的次数
(3)降低各个模块的开发效率
二、源码结构
struct ngx_pool_s {
ngx_pool_data_t d;
size_t max;
ngx_pool_t *current;
ngx_chain_t ...
分类:
其他好文 时间:
2014-07-19 23:16:14
阅读次数:
258
一.iptables简介1.iptables数据包处理流程以本机为目的的包,由上至下,走左边的路本机产生的包,从local process开始走左边的路本机转发的包,由上至下走右边的路简化流程如下:2.iptables表结构在neutron中主要用到filter表和nat表filter表: ...
分类:
其他好文 时间:
2014-07-19 22:18:24
阅读次数:
468
atitit.设计模式(1)--—职责链模式(chain of responsibility)最佳实践O7 日期转换
1. 需求:::日期转换 1
2. 可以选择的模式: 表格模式,责任链模式 1
3. 调用代码 2
4. 责任链链的特性: 2
5. 模式结构 4
6. 职责链模式包含如下角色:Handler,ConcreteHandler: 具体处理者,HandlerChain...
分类:
其他好文 时间:
2014-07-18 22:31:59
阅读次数:
378
一般情况下如果出现连续跳转的时候,经常会出现result is null的问题,这主要是由于action的type默认类型redirect导致的,
我们只需要在出错的action中指定type=“chain”即可。
例如:
(一般写法:用于同一命名空间的action之间跳转时)
adminMain
(标准写法:用于不同命名空间直接切换跳转...
分类:
编程语言 时间:
2014-07-18 22:19:00
阅读次数:
259
默认情况下ubuntu无firewall,除非你自己安装了,怎么装的就怎么删呗。。
如果是已启用的自备的iptables 删了就行了
sudo apt-get remove iptables。...
分类:
其他好文 时间:
2014-07-18 18:02:19
阅读次数:
213
#!/bin/sh
#
# iptables Start iptables firewall
#
# chkconfig: 2345 08 92
# description: Starts, stops and saves iptables firewall
#
# config: /etc/sysconfig/iptables
# co...
分类:
其他好文 时间:
2014-07-18 12:23:55
阅读次数:
354
Chain of Responsibility in the Real WorldThe idea of the Chain Of Responsibility is that it avoids coupling the sender of the request to the receiver,...
分类:
其他好文 时间:
2014-07-18 08:36:38
阅读次数:
294
首先找到iptables文件
一般在 /etc/sysconfig下面
然后vi iptables
如同 添加一行-A INPUT ......即可打开端口
保存后输入
service iptables restart
重启下服务...
分类:
系统相关 时间:
2014-07-16 09:19:33
阅读次数:
242