Articles of ubuntu 14.04

如何configurationIpset来阻止整个国家的IP

我需要阻止一些使用ipset和iptables的国家。 我到目前为止所做的(创build新的ipset set'geoblock'): sudo ipset create geoblock hash:net,port 然后我创build了以下脚本/usr/sbin/ipsetfirewall.sh #!/bin/bash for IP in $(wget -O – http://www.ipdeny.com/ipblocks/data/countries/{cn,iq,af,ir,ae,sg,hk,kw,kg}.zone) do # ban everything – block countryX sudo ipset add geoblock $IP done 正如我在这里解释的,我也试过 wget -O – http://www.ipdeny.com/ipblocks/data/countries/{cn,iq,af,ir,ae,sg,hk,kw,kg}.zone –header "Referer: www.ipdeny.com" 我也试过(因为我使用的是ipv4) wget -4 http://www.ipdeny.com/ipblocks/data/countries/{cn,iq,af,ir,ae,sg,hk,kw,kg}.zone 对于我所有的尝试,我得到这个相同的错误: /usr/sbin$ sudo sh ipsetfirewall.sh –2016-04-21 15:40:58– http://www.ipdeny.com/ipblocks/data/countries/%7Bcn,iq,af,ir,ae,sg,hk,kw,kg%7D.zone Resolving www.ipdeny.com (www.ipdeny.com)… 192.241.240.22 Connecting […]

在另一个根上的nginx子uri

我坚持一个nginx规则: 我必须在我们的监控服务器上使用Nginx,它使用Zabbix。 我成功地为zabbixconfiguration了nginx,这样我就可以访问monit.domain.com并将它发送给zabbix )。 但是我不能设置monit.domain.com/dashboard,所以它显示/ usr / share / dashboard / pages的内容 ,也就是php(当然,只有index.php很重要,你猜对了,这是我的仪表板)。 以下是仪表板特定的nginx conf:在/etc/nginx/sites-enabled/monitoring.conf中: server { ######## server stuff with /location and ssl certs location /dashboard { alias /usr/share/dashboard/pages/index.php; } } 使用root不适合遵循nginx最佳实践(并且不起作用,无论如何我都试过)。 编辑:这里是我在Nginx的日志中得到的错误: [error] 8247#0: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: XXX.XXX.XXX.XXX, server: monit.domain.com, request: […]

HP ProLiant DL380 G5 Linux安装

我想让你知道,我在这里是一个初学者,所以请忍受我。 要开始,我购买了两个惠普ProLiant DL380 G5的便宜,因为在路上的公司下了。 现在我已经安装了它们,它们都运行Windows Server 2003。 我想询问从安装Linux开始的最佳方法,我想运行一个LAMP堆栈来设置和使用Web服务器环境。 (我非常喜欢Linux,并且在硬件的非服务器端定期使用它,我不是盲目地跳入Linux) 我现在是一名Web开发人员,为了获得经验,我想build立自己的实验性Web服务器。 有没有这样做的最好方法,或只是直接上传Linux服务器上的HD。 我可能遇到什么兼容性问题? 感谢您的耐心。

没有www的ServerAlias不能在SSL虚拟主机上工作

我正在将一个站点从一台服务器移动到另一台,并使用当前的和仍然有效的SSL证书。 我正在使用的机器是Ubuntu 14.04服务器。 我已经build立了通常的虚拟主机文件,我们称之为my_domain.conf。 这些是它的内容: #debuggingVirtualHost附近的主要/次要标志 VirtualHost *:443 ServerAdmin [email protected] ServerName mydomain.com ServerAlias www.mydomain.com SSLEngine上 SSLCertificateFile /etc/ssl/certs/mydomain.com.crt SSLCertificateKeyFile /etc/ssl/private/mydomain.com.key DocumentRoot /var/www/html/mydomain.com/public ErrorLog /var/log/apache2/mydomain-error.log TransferLog /var/log/apache2/mydomain-access.log /虚拟主机 现在,当我在浏览器上inputwww.mydomain.com时,VirtualHost工作。 但是,当我键入mydomain.com,它不。 客户和webdesigner都需要它,所以我无法避免它。 我试过了 交换ServerName和ServerAlias,并只使用ServerName 禁用所有其他虚拟主机,包括默认主机 添加SSLStrictSNIVHostCheck在注意到我的一般(而不是特定于站点)error.log此行之后,closures: [ssl:warn] [pid 6558] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366) 没有什么改变,我真的不明白为什么会发生这种情况 […]

戴尔2970服务器双Opteron 2435's_Ubuntu操作系统错误地报告CPU的

2970有BIOS版本4.2.1。 lshw -c处理器给我正确的CPU信息和核心数= 12核心。 cat /proc/cpuinfo和lscpu都给我8核心( 不正确 )。 OS = Ubuntu 14.04 LTS由于第三方软件需求,我不得不使用x86_64版本的操作系统。 论坛上有没有中小企业可以洞察一下发生了什么? 我将grub设置为acpi=off 。 这没有效果。 我只是好奇我能做些什么来让内核注册适量的内核?

Azure vpnbuild立,但有时导致延迟或没有stream量

我们正在尝试使用Azurebuild立VPN Hillstone FW(设备)。 VPN详细信息是: VPN type: Policy based Gateway Subnet: 192.168.50.10/29 default subnet: 192.168.50.0/29 VM inet Address: 192.168.50.4 and Other side Device : Hillstone FW server 1:10.215.369.5/32 server 2:10.215.369.10/32 server 3:10.215.369.11/32 server 4:202.89.35.48/32 我们已经将所有这些添加到本地networking网关中。 在设备端,他们只允许/路由虚拟机(debian Ubuntu的)地址(192.168.50.4/32)所有configuration看起来不错。 为了testing,我们已经打开了两端的所有端口。 由于Hillstone FW不是Azure设备兼容列表。 但是现在VPNbuild立了,在azure门户上它显示数据input/输出。 但连接状态是从连接扑向连接… 他们不允许反向ping。 当我们从Vm ping / telent只发生50%,有时它会给予回复,而不是更多次。 而且大多数ping数据包丢失了60%。 我们是否应该让他们允许整个子网192.168.50.0/29? 我们如何解决这个问题?

Ubuntu无人参与的升级不能在Ubuntu 14.04.4上运行

我已经在Ubuntu 14.04服务器上启用了无人值守升级,并且似乎正在运行,但是它不会更新可以更新的软件包。 例如,现在我得到 46 packages can be updated. 确认前apt-get升级输出: The following packages will be upgraded: galera-3 libgd3 libjbig0 libmariadbclient18 libmysqlclient18 libpcre3 libssl1.0.0 libssl1.0.2 libzip4 mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common mariadb-server-core-10.1 mysql-common newrelic-daemon newrelic-php5 newrelic-php5-common newrelic-sysmond openssl php-common php-igbinary php-imagick php-json php-memcache php-memcached php-msgpack php-xdebug php5.6-bcmath php5.6-cli php5.6-common php5.6-curl php5.6-fpm php5.6-gd php5.6-imap php5.6-json php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-opcache php5.6-readline […]

与Ubuntu的interVlan路由

我有4个vlans创build,我试图使用我的Ubuntu机器作为DNS,DHCP,L3路由器。 我想要我的四个分离,但仍然可以谈话。 这里有一点关于我的设置。 电缆调制解调器(桥接) – > Ubuntu服务器框(见下文) – >戴尔电源连接2824(在pipe理模式) – L2交换机W / IP为192.168.1.1 (在Dell L2交换机内设置4个vlan)vlan1(Mgmt)192.168.1.0/24 vlan10(家庭networking)192.168.10.0/24 vlan20(存储/备份/媒体服务器)192.168.20.0/24 vlan30(Work)192.168.30.0/24 Ubuntu服务器14.4LTS eth0 – 电缆调制解调器IP(WAN)networking掩码255.255.224.0 eth1 – LAN端 – 192.168.10.2networking掩码255.255.255.0 我不能得到这个静态路由设置来挽救我的生命。 Ubuntu服务器。 DNS很好。 DHCP只提供192.168.10.xnetworking的地址。 不会为其他vlan提供地址。 我认为一旦我们把所有的vlans正确地交谈,这个工作就可以工作。 我理解的概念,但需要什么types的具体细节才能得到这个工作,路线应重新启动后持久。 感谢您的协助。 ip address show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 […]

什么样的要求呢?

我在我的服务器上安装了Nginx,我正在从GPS + GPRS设备获取TCP请求。 当我访问access.log我find这个。 126.51.10.6 – – [06/Jun/2016:16:46:53 -0400] "GET / HTTP/1.1" 500 32 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36" 126.51.10.6 – – [06/Jun/2016:16:46:54 -0400] "GET / HTTP/1.1" 500 32 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36" 223.229.182.77 – – [06/Jun/2016:16:47:08 -0400] "(009591810720BP05000009591810720160606A1254.6425N07738.5244E000.0204656000.0000000000L00000033)" 400 181 "-" […]

nginx不启动:不支持libGeoIP.so.1的Verneedlogging

我一直在我的Ubuntu 14.04.4 LTS服务器上运行nginx超过一年没有问题。 但是,几天后nginx无法加载(access.log显示2016年6月13日的最后一次连接)。 nginx -t的输出显示如下错误: nginx: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libGeoIP.so.1: unsupported version 0 of Verneed record 我不记得对系统做任何改变。 但是,我启用了无人参与升级。 删除并重新安装nginx(apt-get remove nginx)也不能解决问题。 有谁知道我怎么可以继续debugging?