linux做网管
echo "1" > /proc/sys/net/ipv4/ip_forward
modprobe ip_tables
modprobe ip_nat_ftp
modprobe ip_nat_irc
modprobe ip_conntrack
modprobe ip_conntrack_ftp
modprobe ip_conntrack_irc
iptables -F
iptables -X
iptables -Z
iptables -F -t nat
iptables -X -t nat
iptables -Z -t nat
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth1 -j MASQUERADE #10.8.0.0:内网
#iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to 192.168.0.104
运行该配置文件即可
相关文档:
这个本来以前也写过的,今天无聊复习下 再写一遍。简单的一塌糊涂,写的不咋地大家见谅哦!有空再加强 嘿嘿!
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <time.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h ......
在安装好Redhat以后,需要设置Ftp和Telnet服务文件,才能启动Ftp和Telnet服务,可以通过远程控制进行开启。
1.1、用root用户登录,进入终端命令模式;
1.2、开启ftp服务。
cd /etc/xinetd.d ,编辑ftp服务的配置文件gssftp的设置:
开启ftp服务设置.
vi gssftp ,将 修改两项内容:
(1)ser ......
----Linux 重启命令----
1、shutdown
2、poweroff
3、init
4、reboot
5、halt
*---具体说明---
shutdown
reboot
在linux下一些常用的关机/重启命令有shutdown、halt、reboot、及init,它们都可以达到重启系统的目的,但每个命令的内部
工作过程是不同的,通过本文的介绍,希望你 ......
在过去的十年中,嵌入式系统的开发发生了很大的变化。以前嵌入式设备往往是一个孤立的、资源有限的系统,它们追求的是在有限的价格上满足一定的功能性要求。通常它们采用那些功能并不强大的CPU,这也是开发者不得不尽可能地压缩嵌入式系统性能的原因。而今天人们对嵌入式设备在 ......