如何用IPCHAINS替代SYGATE
发布时间:2015-07-07 09:16
摘要:如何把一个局域网带入internetr?其实方法有很多,很多人都会选择windows98/2000+sygate/wingate,但是这种方式也有许多不便这处。管理不是很方便且安全性不太好。而linux给人们留下的映像一直就是安全性好,稳定性强。在linux中很多功能强大的防火墙,以redhatlinux7.2为例,在redhatlinux7.2中具有ipchains和iptable。本文就以redhatlinux7.2中ipchains为例来叙述一下如何利用ip伪装实现整个局域网共享上网。
关键字:ip伪装、ip转发、规则链
abstract: how to bring into a local area network internetr? in fact, there are a lot of ways, many people will choose windows 98/2000 + sygate / wingate, but this way there are many inconveniences, this place is. management is not easy and not very good security. linux and to the left of the image has been security, and stability. linux in a lot of powerful firewall to red hat linux 7.2, for example, in red hat linux 7.2 has ipchains and iptable. this article by red hat linux 7.2 in ipchains described as an example how to camouflage the use of ip throughout the local area network to share internet access.
keywords: ip camouflage, ip forwarding, and the rules of chain
实现步骤:
1.准备活动
1.把所有的计算机连成的一个局域网
2.安装linux服务器(eth0接internet的211.162.11.8/255.255.255.128,eth1地址192.168.0.1/255.255.255.0)
3.为服务器添加默认网关
方法一:routeadddefaultgw211.162.11.1(网关是isp所给的网关服务器)
方法二:使用linuxconf工具来设置
2.安装dhcp服务器
为了使网络管理更方便可以实现动态分配ip地址,所以必须要把的服务器做成一个dhcp服务器具体如下:
(1.)安装dhcp的rpm包
(2.)在/etc下编辑
内容如下:
subnet192.168.0.0netmask255.255.255.0
{
optionrouters192.168.0.1;
optiondomain-name-servers211.162.0.10;
range192.168.0.2192.168.0.254;
}
subnet211.162.11.0netmask255.255.255.128
{
}
dhcp的注意事项:
(1).必须要指定默认网关服务器(optionrouters192.168.0.1;)
(2).必须指定dns服务器(optiondomain-name-servers211.162.11.4;)
(3).要建立与eth0相同的网络号的空范围的作用域(subnet211.162.11.0netmask255.255.255.128{})
(4).把dhcp服务邦定到接lan的网卡上
3.配置ip转发
所谓ip转发是可以简单说成ip包从一个网段发送到另一个网段(既从eth1转到eth0).在一些低版本的linux中不支持ip转发,在这些版本中要重新编译内核才行.但redhatlinux7.2支持ip转发只要如下配置:
编辑/etc/sysconfig/network内容:
network="yes"
hostname=""
gateway="211.162.11.1"//用于指定网关为211.162.11.1(211.162.11.1为isp所给的网关服务器)
gatedev="eth0"//用于指定网关设备为eth0(指定应该为接internet的网卡)
forward_ipv4="yes"//支持ip转发(这一行必不可少)
4.配置ipchains
redhatlinux7.2的内核支持ipchains服务,可以利用ntsysv启动ipchains。hains只是一种防火墙,如何设置防火墙才能支持ip伪装。首先要了解ipchains的使用方法,在ipchains中最重要的是规则链,所谓规则链就是规定防火规则,既在规则链上定义一些规则,如:是否允许某个网段向发送信息.ipchains中的有四种规则链:input链、output链、forward链、用户自定义链。至于ipchains的具体的操作方法在这里就不详细介绍,读者可以查找其它的一些资料。这里我们只给大家介绍如何配置ipchains的各条链以实现ip伪装和网络安全。
具体如下:
可以把ipchains的配置编写为一个shell脚本程序,本文把所有的ipchains配置编写是的系统启动自动运行的脚本,其它的脚本要手工运行)
/中(
/sbin/ipchains-pforwarddeny
/sbin/ipchains-aforward-s192.168.1.0/255.255.255.0-jmasq
/sbin/ipchains-finput
/sbin/ipchains-foutput
注:以上几行是用于设置ipchains防火墙的基本规则,第二行就是用于设置ip伪装(本例中设置了可以对192.168.1.0/255.255.255.0子网内主机进行ip转发和伪装).如果你对网络进行管理可以修改.如:不让别人聊qq可以在中加上以下几行:
/sbin/ipchains-ainput-jdeny-s
/
/
/
/
/
/
只要你能灵活使用ipchains你就可以方使的去管理整个网络.
5.总结
ipchains是一个功能强大的防火墙,要灵活的使用就可以很方便管理网络且你的网络会更安全。但是在linux中ipchains不是最好的防火墙,linux中还有很多其它的防火墙如:iptable和filtrater。现在iptable用的也比较多,因为它的速度比ipchains要快、管理机制也简单,在后续的文章中再作介绍。
关键字:ip伪装、ip转发、规则链
abstract: how to bring into a local area network internetr? in fact, there are a lot of ways, many people will choose windows 98/2000 + sygate / wingate, but this way there are many inconveniences, this place is. management is not easy and not very good security. linux and to the left of the image has been security, and stability. linux in a lot of powerful firewall to red hat linux 7.2, for example, in red hat linux 7.2 has ipchains and iptable. this article by red hat linux 7.2 in ipchains described as an example how to camouflage the use of ip throughout the local area network to share internet access.
keywords: ip camouflage, ip forwarding, and the rules of chain
实现步骤:
1.准备活动
1.把所有的计算机连成的一个局域网
2.安装linux服务器(eth0接internet的211.162.11.8/255.255.255.128,eth1地址192.168.0.1/255.255.255.0)
3.为服务器添加默认网关
方法一:routeadddefaultgw211.162.11.1(网关是isp所给的网关服务器)
方法二:使用linuxconf工具来设置
2.安装dhcp服务器
为了使网络管理更方便可以实现动态分配ip地址,所以必须要把的服务器做成一个dhcp服务器具体如下:
(1.)安装dhcp的rpm包
(2.)在/etc下编辑
内容如下:
subnet192.168.0.0netmask255.255.255.0
{
optionrouters192.168.0.1;
optiondomain-name-servers211.162.0.10;
range192.168.0.2192.168.0.254;
}
subnet211.162.11.0netmask255.255.255.128
{
}
dhcp的注意事项:
(1).必须要指定默认网关服务器(optionrouters192.168.0.1;)
(2).必须指定dns服务器(optiondomain-name-servers211.162.11.4;)
(3).要建立与eth0相同的网络号的空范围的作用域(subnet211.162.11.0netmask255.255.255.128{})
(4).把dhcp服务邦定到接lan的网卡上
3.配置ip转发
所谓ip转发是可以简单说成ip包从一个网段发送到另一个网段(既从eth1转到eth0).在一些低版本的linux中不支持ip转发,在这些版本中要重新编译内核才行.但redhatlinux7.2支持ip转发只要如下配置:
编辑/etc/sysconfig/network内容:
network="yes"
hostname=""
gateway="211.162.11.1"//用于指定网关为211.162.11.1(211.162.11.1为isp所给的网关服务器)
gatedev="eth0"//用于指定网关设备为eth0(指定应该为接internet的网卡)
forward_ipv4="yes"//支持ip转发(这一行必不可少)
4.配置ipchains
redhatlinux7.2的内核支持ipchains服务,可以利用ntsysv启动ipchains。hains只是一种防火墙,如何设置防火墙才能支持ip伪装。首先要了解ipchains的使用方法,在ipchains中最重要的是规则链,所谓规则链就是规定防火规则,既在规则链上定义一些规则,如:是否允许某个网段向发送信息.ipchains中的有四种规则链:input链、output链、forward链、用户自定义链。至于ipchains的具体的操作方法在这里就不详细介绍,读者可以查找其它的一些资料。这里我们只给大家介绍如何配置ipchains的各条链以实现ip伪装和网络安全。
具体如下:
可以把ipchains的配置编写为一个shell脚本程序,本文把所有的ipchains配置编写是的系统启动自动运行的脚本,其它的脚本要手工运行)
/中(
/sbin/ipchains-pforwarddeny
/sbin/ipchains-aforward-s192.168.1.0/255.255.255.0-jmasq
/sbin/ipchains-finput
/sbin/ipchains-foutput
注:以上几行是用于设置ipchains防火墙的基本规则,第二行就是用于设置ip伪装(本例中设置了可以对192.168.1.0/255.255.255.0子网内主机进行ip转发和伪装).如果你对网络进行管理可以修改.如:不让别人聊qq可以在中加上以下几行:
/sbin/ipchains-ainput-jdeny-s
/
/
/
/
/
/
只要你能灵活使用ipchains你就可以方使的去管理整个网络.
5.总结
ipchains是一个功能强大的防火墙,要灵活的使用就可以很方便管理网络且你的网络会更安全。但是在linux中ipchains不是最好的防火墙,linux中还有很多其它的防火墙如:iptable和filtrater。现在iptable用的也比较多,因为它的速度比ipchains要快、管理机制也简单,在后续的文章中再作介绍。
上一篇:SPSS在信度分析中的应用研究