我们的 postfix 服务器上有一个邮件用户,他使用公司邮件向我们的竞争对手发送入侵信息。
我被要求报告该用户上次的操作。
有像 pflogsumm 这样的工具可以提取统计数据,但到目前为止我还没有找到任何有用的东西来获取用户的所有信息,因为数据是多行的。
我想得到这样的东西:
对于发送的邮件
11/11/11 00:00:00 infractor@example.com -> user@anothercompany.com
11/11/11 00:00:01 infractor@example.com -> user2@anothercompany2.com
Run Code Online (Sandbox Code Playgroud)
对于收到的邮件
10/10/11 00:00:00 user@anothercompany.com -> infractor@example.com
10/10/11 00:00:01 user2@anothercompany2.com -> infractor@example.com
Run Code Online (Sandbox Code Playgroud)
我知道我可以自己做一个脚本,但是匹配每封邮件的后缀 ID 不是可以通过简单的 grep 来完成的,而且我有很多邮件历史记录,我必须重新检查分布在不同文件中的邮件等等在。
源日志是标准的后缀格式,例如这个...
Sep 13 16:15:57 server postfix/qmgr[18142]: B35CB5ED3D: from=<infractor@example.com, size=10755, nrcpt=1 (queue active)
Sep 13 16:15:57 server postfix/smtpd[32099]: disconnect from localhost[127.0.0.1]
Sep 13 16:15:57 server postfix/smtp[32420]: 58C3E5EC9C: to=<user@anothercompany.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.4, delays=0.01/0/0/1.4, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=32697-04, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as B35CB5ED3D)
Sep …Run Code Online (Sandbox Code Playgroud) 使用最新的 nginx,是否可以仅代理缓存特定的 html 状态代码响应?
我们对某些响应使用 410 状态代码。
这些都是根据我们的数据库进行检查的。
当所述内容被标记为永久删除(410)时,发送 410 状态代码。
此内容将永远消失。
我们只想代理缓存这些结果。
这可能吗?
我已经用 C# 为 windows 编写了一个服务器,它工作正常。一周前,我使用No-Ip.com设置了一个动态域名,现在我的服务器在地址nabeel.ddns.net 上提供页面。我正在查看我的服务器日志,发现两个奇怪的请求:
16:41:52 21-04-2015 94.66.163.214 :::: x?|?aAL? ?W???????????\?&K??2??Q@?
Run Code Online (Sandbox Code Playgroud)
和:
11:36:21 21-04-2015 146.185.239.100, File: h t t p://24x7-allrequestsallowed.com/
Run Code Online (Sandbox Code Playgroud)
(我把中间的日志格式从【时间】【日期】【ip地址】【请求路径】改为【时间】【日期】【ip地址】【整个请求】)
对两个 IP 地址的 whois 查询显示,两者都在分配给 RIPE 网络协调中心 (RIPE) 的网络范围内。我该怎么办,这是否属于 DOS 攻击?我应该给 RIPE 发电子邮件吗?
请帮忙
Ubuntu 14.04 Apache 2.4.18
我已经使用 letencrypt 设置了 SSL 证书。它运行良好,但为了工作,我不能在一个虚拟主机配置文件中定义多个虚拟主机。每个虚拟主机都必须位于 /etc/apache2/sites-available 内的自己的 .conf 文件中。
我需要确保对 www.example.com 的所有请求都重定向到 example.com。由于我需要在唯一的虚拟主机文件中解决它,我试图在里面包含一个重写规则来执行重定向,但到目前为止它无声地失败了:所有https://www.example.com请求都没有被重定向到https ://example.com并显示“不安全的网站”警告。
这是 domain.com-le-ssl.conf 的虚拟主机配置文件。
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName example.com
ServerAlias www.example.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.+) [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,R=301]
DocumentRoot /home/user_account/www/example.com/public
<Directory /home/user_account/www/example.com/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/home/user_account/www/example.com/public/$1
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
Run Code Online (Sandbox Code Playgroud) 我已将 Ubuntu 机器配置为路由器。NAT 配置步骤如下:
#iptables -F
#iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
#iptables-save > /etc/network/iptables
Run Code Online (Sandbox Code Playgroud)
然后将此文件位置保存在 rc.local
#vi /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
/sbin/iptables-restore < /etc/network/iptables
# In order to enable or disable this script just change the execution
# bits.
#
# …Run Code Online (Sandbox Code Playgroud) 我的服务器出现问题,并且一直在使用iftop实时显示与服务器之间的连接。
它显示了一个与我不断连接的 IP 地址,但我找不到有关其用途的任何信息。
我怎样才能找出那个 ip 对我的服务器做了什么?
编辑:在答案的帮助下,我能够使用 iftop 看到以下内容
my.ip.address:46414 => 199.16.156.20:https
Run Code Online (Sandbox Code Playgroud)
然后使用 netstat -a 我看到以下内容
tcp 0 0 my.ip.address:46414 199.16.156.20:https ESTABLISHED
Run Code Online (Sandbox Code Playgroud)
我确实有一个 apache 网络服务器,但该 IP 没有显示在日志中。此外,为什么它连接到端口 46414??他在做什么!
谢谢
EDIT2:好的,感谢 Daniel t 的回答。我越来越近了 我试过 lsof -i:46475 这是输出
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
apache2 22003 www-data 19u IPv4 716074 0t0 TCP ns.arg2.wirall.com:46475
Run Code Online (Sandbox Code Playgroud)
所以看起来 apache 正在做一些事情......但因为它是一个出站连接,我怎么知道它到底在做什么?
我认为这是一个简单的问题,但让我更好地解释一下。我有以下开发环境:
一切正常,除了 VirtualHost 配置。我想部署两个应用程序:Drupal 和 Wordpress。每个应用程序都有自己的目录,例如:
在默认站点中,VirtualHost 配置指向 /var/www作为文档根目录。我想禁用这个默认站点配置,我想创建两个 VirtualHosts,一个用于 Drupal,另一个用于 Wordpress。
但是,这是一个开发环境,这里没有域。我搜索了很多网站,找到了很多教程,所有教程都解释了如何使用域而不是子目录来执行此操作。
完成配置后,访问我的应用程序的 URL 将是:
- http://example.com/wordpress;
- http://example.com/drupal;
Run Code Online (Sandbox Code Playgroud)
我已经尝试过这个 VirtualHost:
<VirtualHost *:80>
ServerName example.com
ServerAdmin web@myserver.com
DocumentRoot /l/disk0/site/public_html
<Directory />
AllowOverride None
</Directory>
Alias /site /l/disk0/site/public_html
<Directory /l/disk0/site/public_html>
Options MultiViews Indexes Includes FollowSymLinks ExecCGI
AllowOverride All
Require all granted
allow from all
</Directory>
RewriteEngine On
LogLevel warn
ErrorLog …Run Code Online (Sandbox Code Playgroud) 有人在扫描我的邮件服务器。
我能做些什么来阻止他们?
我尝试添加这个并没有帮助:
/etc/hosts.deny
ALL: 80.82.77.18
Run Code Online (Sandbox Code Playgroud)
我在日志中看到这个:
...
Aug 23 03:34:40 auth-worker(1664): Info: sql(torcac@example.net,80.82.77.18): unknown user (given password: torcac)
Aug 23 03:35:17 auth-worker(1664): Info: sql(roselia@example.net,80.82.77.18): unknown user (given password: roselia)
Aug 23 03:35:56 auth-worker(1664): Info: sql(japan@example.net,80.82.77.18): unknown user (given password: japan)
Aug 23 03:36:35 auth-worker(1664): Info: sql(berta@example.net,80.82.77.18): unknown user (given password: berta)
Aug 23 03:37:08 auth-worker(1664): Info: sql(blue,193.169.252.176): unknown user (given password: 123456)
Aug 23 03:37:12 auth-worker(1664): Info: sql(keely@example.net,80.82.77.18): unknown user (given password: keely)
Aug 23 03:37:49 auth-worker(1664): Info: sql(marcelia@example.net,80.82.77.18): …Run Code Online (Sandbox Code Playgroud) 我正在尝试设置供 Apache 使用的自签名通配符证书,通常这非常简单,我只需使用根域设置主题备用名称,并在通用名称字段中指定 *.dcrdev.com。但是,这似乎不起作用 - 当我尝试在 chrome 中访问该站点或在 sslabs 中对其进行测试时,他们在访问任何子域(例如 www.dcrdev.com 或 subdomain1.dcrdev.com)时报告 URL 不匹配。我不知道为什么,当我在 chrome 中查看证书信息时,它显示的通用名称为 *.dcrdev.com。
我的客户代表:
Certificate Request:
Data:
Version: 0 (0x0)
Subject: C=GB, ST=South Yorkshire, L=Sheffield, O=DCR Holdings, OU=DCR Development, CN=*.dcrdev.com/emailAddress=webmaster@dcrdev.com
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (4096 bit)
Modulus:
lah blah
Run Code Online (Sandbox Code Playgroud)
我的证书:
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 1048577 (0x100001)
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=GB, ST=South Yorkshire, L=Sheffield, O=DCR Holdings, OU=DCR Root Authority, CN=*.dcrdev.com/emailAddress=administrator@dcrdev.com
Validity
Not Before: Oct 13 23:41:03 2015 …Run Code Online (Sandbox Code Playgroud) 我只有一个公共 IP 地址和三个 Web 服务器在LAN. 我想像这样将流量重定向WAN到 Web 服务器,必须支持SSL/TLS流量重定向:
https://www.example.com (A Record)===> 1.1.1.1(Public IP) ===> 192.168.1.1(Web 1)
https://www.example.net (A Record)===> 1.1.1.1(Public IP) ===> 192.168.1.2(Web 2)
Run Code Online (Sandbox Code Playgroud)
HAProxy能完成这项工作吗?
apache-2.4 ×3
ubuntu ×3
postfix ×2
apache-2.2 ×1
blocking ×1
cache ×1
directory ×1
dovecot ×1
email ×1
haproxy ×1
ip ×1
ip-address ×1
iptables ×1
lets-encrypt ×1
nat ×1
networking ×1
nginx ×1
openssl ×1
request ×1
rewrite ×1
unix ×1
virtualhost ×1
web ×1