当前位置: 首页 >> Tag标签为 'NAT'

OpenVZ的VPS里不支持nat表?

在vps里执行:

iptables -t nat -L

提示:

iptables v1.2.11: can’t initialize iptables table `nat’: Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

Read the rest of this entry »

OpenVPN:内网无端口映射建立VPN问题

本文介绍的操作均在CentOS 6.0下完成,关于CentOS下如何安装OpenVPN,参考:CentOS6下如何快速安装OpenVPN,本文介绍OpenVPN使用静态密钥建立VPN的方法,关于使用Mode server方式建立OpenVPN,参考本人以前写的文章: OpenVPN在Linux下的安装[CA]OpenVPN使用User/Pass验证登录OpenVPN在Windows下使用User/Pass验证Windows 下使用 CA 验证的 OpenVPN Server 的配置方法。大家慢慢参考。

Read the rest of this entry »

Linux NAT之LOG问题

NAT在现实生活中解决了不少问题,随之而来的事件追踪也是一件麻烦事,由于NAT修改数据包的源地址(或端口),因此,只能通过记录NAT前后的IP地址来解决。

Read the rest of this entry »

单IP做NAT支持的最大连接数问题

和一些做NAT的老师接触,谈起NAT的问题,大多数都是自己用Linux使用iptables来搞定的,在具体谈到地址池的时候,发现很多老师都习惯将1个C网络NAT到一个单独的IP地址上,如果有N个C类地址,那就需要写N条iptables规则,当然这样做的好处是用户的源地址永远不会变,便于事件的追查等,当问到为什么非要把1个C映射到一个IP地址上时,大家的回答都是:怕一个地址的端口数量不够,导致连接数不够。

Read the rest of this entry »

用iptables做NAT地址池问题

用Linux做路由相信大家都不陌生,其实做路由,只需要把系统的转发功能打开即可,但是我们常说的做路由,往往都是路由+NAT(网络地址转换),因为我们IPv4地址在紧缺了,相信大家也看过不少文章,关于如何那Linux做路由,如何配置,这里简单介绍一下:

最简单的方法:

iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

这样,从eth1出去的报文,如果在conntrack表中不存在,则系统会自动用eth1的某个可用地址替换,这样配置的好处是,无论eth1的地址怎么修改,只要配置正确下面的用户都可以访问互联网。

Read the rest of this entry »

modprobe.conf怎么不见了—-CentOS 6

用习惯了CentOS或RHEL的用户或许很熟悉/etc/modprobe.conf文件,系统声卡、网卡、SCSI卡的驱动类型都在这里定义,同样部分动态加载的模块的参数也可以在这个文件中定义,但是在CentOS6安装完毕后,在etc目录中却找不到modprobe.conf文件了,到底modprobe.conf文件到哪里去了?

Read the rest of this entry »

IPv6 NAT-期待了好久

A simple NAT(network address translation) for IPv6 (Linux only). Make sure if you really need it before using it. Functions: 1. IPv6 auto configuration; 2. TCP, UDP and ICMP-Echo port forwarding; 3. static port mapping for TCP and UDP.

http://sourceforge.net/projects/ipv6nat/

Netfilter Connmark

Introduction

CONNMARK is a cool feature of Netfilter. It provides a way to have a mark which is linked to the a connection tracking entry. Once a connmark is set, it also apply for RELATED connection entry. So, if you add a connmark to an FTP connection, the same connmark will be put of connections from ftp-data.

Read the rest of this entry »

Linksys SIP网关NAT问题

Hi, Guys:

I am hitting a wall here. Trying to set up a simple point-to-point Voip by following the instruction http://forum.voxilla.com/linksys-sip…oint-9415.html
Read the rest of this entry »

Linux NAT优化手册

最大连接数:

其实说来说去,就2个参数,还是看看原文吧,怕我给理会错了

还是这个详细:http://www.wallfire.org/misc/netfilter_conntrack_perf.txt

SMP(SMP环境中中断优化):

http://www.cs.uwaterloo.ca/~brecht/servers/apic/SMP-affinity.txt

—-
看别人说这样优化后效果不错,由于目前我所管理的NAT机器流量和连接数不至于这么大,所以算是没有验证过。

Read the rest of this entry »