Articles of ubuntu 14.04

如何正确configurationMongoDB在Ubuntu上使用Letsencrypt SSL

我如何正确地configurationMongoDB在Ubuntu上使用Letsencrypt SSL? 我已经使用Letsencrypt创build了一个SSL证书,并通过以下方式进行组合: cat /etc/letsencrypt/live/example.com/fullchain.pem /etc/letsencrypt/live/example.com/privkey.pem > /etc/ssl/mongo.pem 并设置如下mongoconfiguration: net: port: 27017 bindIp: 0.0.0.0 ssl: mode: requireSSL PEMKeyFile: /etc/ssl/mongo.pem 但是在尝试启动Mongo时出现这个错误: No SSL certificate validation can be performed since no CA file has been provided; please specify an sslCAFile parameter 我如何正确设置CAFile? 不是Ubuntu通常在自己的文件中使用一系列不同的根证书的“CApath”? 我尝试使用CURL CA软件包,但也没有工作。 我使用Mongo v3.0.12和Ubuntu 14.04

httpstream量显示与https上的stream量不同的目录

我在ubuntu 14.04上运行apache2,并使用Let's Encrypt设置了SSL。 在我的域名之一(域名A)它工作正常。 我可以达到它 http://domainA.com http://www.domainA.com 要么 https://domainA.com https://www.domainA.com 但是,我有附加的域指向框,并为每个这样的虚拟服务器设置。 我以同样的方式设置domainA( 如果您想知道如何使用,请参阅本教程 ) 在我的其他网域上,通过https的stream量显示了正确的虚拟内容 – 但是通过http的stream量只显示了根目录(所以默认的index.html出现)。 在/ etc / apache2 /网站,可用我有以下几点: 000-default.conf default-ssl.conf domainA.com.conf domainA.com-le-ssl.conf domainB.com.conf domainB.com-le-ssl.conf 它们的设置完全相同,只是相关的信息发生了变化。 domainA .conf如下所示: <VirtualHost *:80> ServerAdmin [email protected] ServerName domainA.com ServerAlias www.domainA.com DocumentRoot /var/www/html/domainA/public_html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> domainB.conf看起来完全相同,除了用“domainB”代替domainA。 domainA.com-le-ssl.conf文件看起来几乎完全相同,除了包括所有合适的SSL文件并且在端口443上(当我使用Let's Encrypt创build文件时,它是dynamic生成的 – 我没有碰到它们) 所以domainB.conf看起来像这样: <VirtualHost *:80 […]

为什么回声“ens6f1”?解释为ns6f1即出“e”

我正在尝试执行 echo "ens6f1" > /sys/class/net/bond0/bonding/slaves 但得到错误: bond0:接口ns6f1不存在! 这是一个“回声”问题或与我正在写的文件的一些问题。 Ubuntu 14.04.4 ip ll ens6f1 25: ens6f1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 link/ether 14:02:ec:67:fd:95 brd ff:ff:ff:ff:ff:ff

在使用SSL / TLS时debuggingOpenLDAP

我有slapd版本:2.4.31-1 + nmu2ubuntu8.3在Ubuntu 14.04上启动。 它被configuration为通过端口389的TLS,以及636上的SSL。 我遇到了一个查询问题,testing一个新的应用程序,不太清楚如何debugging它。 我可以在ldap服务器上运行tcpdump ,但是除非我把端口389放到明文中,否则没什么用处。 我真的不想这样做,因为从安全angular度考虑,testing应用程序中使用的任何密码基本上都会受到影响。 我唯一能想到的就是用-D 255重新启动slapd ,但是真的想看看客户端和服务器之间的会话数据。 如何查看在PHP应用程序和ldap服务器之间传输的数据,而不影响会话的完整性? 在/var/log/文件中很less出现。 更新:我为我的cn=config安装添加了额外的日志logging,如下所示: 将以下内容写入logmod.ldif: dn: cn=config changetype: modify replace: olcLogLevel olcLogLevel: stats dn: cn=config changetype: modify add: olcLogLevel olcLogLevel: stats2 然后运行: sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// -f logmod.ldif

SNMP 14绑定错误在Ubuntu 14.04服务器

我想让运行Ubuntu Server 14.04的Zenoss服务器上运行SNMPD。 我安装了它并configuration了它,但是当我启动它时,syslog中出现以下错误: Aug 14 08:19:16 zenoss snmpd[9904]: Turning on AgentX master support. Aug 14 08:19:16 zenoss snmpd[9904]: Turning on AgentX master support. Aug 14 08:19:16 zenoss snmpd[9904]: Error opening specified endpoint "udp:127.0.0.1:161" Aug 14 08:19:16 zenoss snmpd[9904]: Server Exiting with code 1 如果我在命令行(sudo / usr / sbin / snmpd -f)运行SNMPD,它可以正常工作。 我做了一个netstat -oan | […]

简单的DoS保护与mod_security?

我在ubuntu 14.04 LTS服务器上安装mod security2 。 我看到下面的教程: http : //blog.cherouvim.com/simple-dos-protection-with-mod_security/ 上面的遗憾不对我的apache错误工作: * Restarting web server apache2 [fail] * The apache2 configtest failed. Output of config test was: AH00526: Syntax error on line 226 of /etc/modsecurity/modsecurity.conf: ModSecurity: No action id present within the rule Action 'configtest' failed. Apache错误日志可能有更多的信息。 你能推荐类似的东西吗?

iptables和TPROXY支持

我在Ubuntu 14.04上运行iptables v1.4.21,并试图设置iptables来使用TPROXY 。 我如何检查我的当前版本的iptables是否支持TPROXY ? 我可以使用haproxy -vv来检查haproxy -vv对HAProxy的支持, iptables有类似的东西吗? 如果没有TPROXY支持,是否存在iptables v1.4.21的TPROXY补丁? 还是另一个版本的iptables更合适?

nginx + php5-fpm优雅重启:在Ubuntu 14.04 LTS上重新加载

我试图find一种方法来gracvelly重新启动我的服务器。 我尝试sudo service php5-fpm reload && sudo service nginx reload 但是这不起作用,因为在Ubuntu 14.04上重新加载php5-fpm无法正常工作(php5-fpm实例显示为未知) 执行先前的命令后,我得到了 sudo service php5-fpm status > php5-fpm stop/waiting sudo service php5-fpm restart > stop: Unknown instance: > php5-fpm start/running, process 26042 sudo service php5-fpm restart > stop: Unknown instance: > php5-fpm start/running, process 26141 我发现重启php5-fpm的唯一方法就是运行: sudo killall php5-fpm sudo service php5-fpm start > […]

运行letsencrypt的certbot作为cron作业时的不同行为

按照本指南,我在Ubuntu 14.03上安装了letsencrypt: https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-14-04 我还创build了一个cron作业来进行证书更新(如指南中所述),但后来发现以下问题: certbot-auto renew (作为非root用户), sudo certbot-auto renew在从命令行进行testing时同时sudo certbot-auto renew (certbot报告证书尚未到期(如预期的那样) 但是,当相同的命令由cron(以root身份)运行时,certbot会尝试自行升级。 任何想法,为什么我得到这种不同的行为? 在shell控制台上手动运行命令并使其通过cron运行有什么区别? 更新:我添加了–no-self-upgrade但没有任何区别。 在进一步调查中,我注意到以下几点 sudo certbot-auto renew –dry-run正常工作 sudo su; certbot-auto renew –dry-run sudo su; certbot-auto renew –dry-run尝试首先升级certbot 出于某种原因,certbot似乎认为它没有正确安装在第二种forms运行时。

Ubuntu 14.04和Apache 2.4.7每个虚拟主机的特定用户

我已经运行Ubuntu 12.04和Apache 2.2一段时间了,现在使用apache2-mpm-itk来为每个虚拟主机指定一个用户。 我已经将我的VPS升级到Apache 2.4.7附带的Ubuntu 14.04。 我刚刚试图安装apache2-mpm-itk,但我得到一些依赖性错误。 # apt-get install apache2-mpm-itk Reading package lists… Done Building dependency tree Reading state information… Done The following extra packages will be installed: libapache2-mpm-itk The following NEW packages will be installed: apache2-mpm-itk libapache2-mpm-itk 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 11.2 […]