几周前,我的VPS遭到DDoS攻击,IP: 81.4.108.50。我刚刚得到了一个DDoS过滤IP: 185.34.216.166,并将域名指向它。但我不知道如何将这个IP绑定到apache服务。我试着重新启动apache,看看它是否绑定并获得了:
apache2:无法可靠地确定服务器的完全限定域名,ServerName使用81.4.108.50
Apache仍然希望使用旧的IP。我查看了apache2.conf,发现其中没有IP地址,也没有任何“侦听”。我不知道该怎么做才能将这个过滤的IP绑定到apache。我希望这里有人能帮我渡过难关。谢谢。
服务器版本: Apache/2.2.22 (Debian)
root@Landslyde ~# netstat -tap | grep LISTEN
tcp 0 0 *:8033 *:* LISTEN 31317/eggdrop
tcp 0 0 *:8067 *:* LISTEN 8570/ircd
tcp 0 0 *:6697 *:* LISTEN 8570/ircd
tcp 0 0 Landslyde:7050 *:* LISTEN 31794/eggdrop
tcp 0 0 *:ircd *:* LISTEN 8570/ircd
tcp 0 0 Landslyde:6668 *:* LISTEN 18439/eggdrop
tcp 0 0 Landslyde:6669 *:* LISTEN 18709/eggdrop
tcp 0 0 underworld.chat:http *:* LISTEN 18915/apache2
tcp 0 0 *:32277 *:* LISTEN 31317/eggdrop
tcp 0 0 *:ssh *:* LISTEN 19920/sshd
tcp 0 0 Landslyde:32278 *:* LISTEN 31407/eggdrop
tcp6 0 0 [::]:12322 [::]:* LISTEN 18915/apache2
tcp6 0 0 [::]:41411 [::]:* LISTEN 28336/znc
tcp6 0 0 [::]:5555 [::]:* LISTEN 9577/znc
tcp6 0 0 [::]:33333 [::]:* LISTEN 16304/znc
tcp6 0 0 [::]:ssh [::]:* LISTEN 19920/sshd
tcp6 0 0 [::]:https [::]:* LISTEN 18915/apache2
root@Landslyde ~#
root@Landslyde ~# ifconfig -a
gre0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:1476 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
gretap0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
BROADCAST MULTICAST MTU:1476 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
ip6tnl0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:1460 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1333187 errors:0 dropped:0 overruns:0 frame:0
TX packets:1333187 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:90117469 (85.9 MiB) TX bytes:90117469 (85.9 MiB)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.2 P-t-P:127.0.0.2 Bcast:0.0.0.0 Mask:255.255.255.255
inet6 addr: 2a00:d880:3:2::7ae5:4651/128 Scope:Global
inet6 addr: 2a00:d880:3:2::e756:ba7c/128 Scope:Global
inet6 addr: 2a00:d880:3:2::bd41:1a90/128 Scope:Global
inet6 addr: 2a00:d880:3:2::5c0b:2714/128 Scope:Global
inet6 addr: 2a00:d880:3:2::297:a731/128 Scope:Global
inet6 addr: 2a00:d880:3:2::6f2e:3a5c/128 Scope:Global
inet6 addr: 2a00:d880:3:2::7d2:891e/128 Scope:Global
inet6 addr: 2a00:d880:3:2::b6e8:cab1/128 Scope:Global
inet6 addr: 2a00:d880:3:2::3583:7f57/128 Scope:Global
inet6 addr: 2a00:d880:3:2::b962:72d6/128 Scope:Global
inet6 addr: 2a00:d880:3:2::7f0b:2696/128 Scope:Global
inet6 addr: 2a00:d880:3:2::a726:9e75/128 Scope:Global
inet6 addr: 2a00:d880:3:2::e212:fcba/128 Scope:Global
inet6 addr: 2a00:d880:3:2::ae8b:17c/128 Scope:Global
inet6 addr: 2a00:d880:3:2::d5a:47c3/128 Scope:Global
inet6 addr: 2a00:d880:3:2::5e63:c793/128 Scope:Global
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:239700733 errors:0 dropped:0 overruns:0 frame:0
TX packets:62084551 errors:0 dropped:4 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:83918544871 (78.1 GiB) TX bytes:10965021780 (10.2 GiB)
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:81.4.108.50 P-t-P:81.4.108.50 Bcast:81.4.108.50 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
venet0:1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:185.34.216.166 P-t-P:185.34.216.166 Bcast:185.34.216.166 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
root@Landslyde ~#发布于 2015-06-04 01:52:13
您不将IP绑定到Apache,而是使用服务器的网络接口绑定它。
您要做的是让Apache侦听特定的IP地址和端口,所以这部分是正确的。语义。
文件/etc/apache2/ports.conf中有什么?添加新IP后,您是否重新启动了服务器?
你能给我们输出以下命令吗?
ifconfig -a
netstat -tap | grep LISTENhttps://serverfault.com/questions/696461
复制相似问题