0

I was DDoS attacked on my VPS a couple weeks ago, IP: 81.4.108.50. I just got a DDoS filtered IP: 185.34.216.166 and have pointed the domain name to it. But I don't know how to bind this IP to apache services. I tried restarting apache to see if it wld bind and got:

apache2: Could not reliably determine the server's fully qualified domain name, using 81.4.108.50 for ServerName

Apache is still wanting to use the old IP. I've looked in apache2.conf and find no IP address in it, nor anything "listening". I don't know what to do to get this filtered IP bound to apache. I hope someone here can help me through this. Thank you.

Server version: 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 ~#
0

You don't bind the IP to Apache, you bind it using the server's network interface.

What you are trying to do is to get Apache to listen on a specific IP address and port, so that part is correct. Semantics.

What is in the file /etc/apache2/ports.conf? Have you restarted the server since you added the new IP?

Can you give us the output of the following commands?

ifconfig -a

netstat -tap | grep LISTEN
3
  • I actually made changes to the ports.conf and the 000-default files to reflect the DDoS IP. In the ports.conf, instead of Listen * 80, it is now Listen DDoS.IP:80. And in the 000-default file, I had to reflect the IP for for the VirtualHost. All I'm waiting for is the DNS to resolve to the DDoS IP. I hope I've done this correctly. – fmc Jun 4 '15 at 3:52
  • That should work. Just be sure to change your NameVirtualHost in ports.conf (which I think you have). Also, be sure the new IP is bound to your server. You can tell this by pinging it or by trying to ssh to the new IP. Also add a ServerName your.server.name.that.resolves.to.new.IP or simply ServerName your.new.ip.address to your apache.conf or httpd.conf file. – Michael McAuliffe Jun 4 '15 at 4:14
  • Thanks for your help, Michael. Still waiting for the DNS to resolve, but the command you gave me to try (netstat -tap | grep LISTEN) showed me it's indeed listening for/to the new IP. And in the 000-default file, I had already provided the www.undrworld.chat to both the 80 and 443 <VirtualHost> blocks. – fmc Jun 4 '15 at 22:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.