Dual NIC weird Issue, one crashes and one still works

Discussion in 'Installation/Configuration' started by n0fx, Mar 16, 2012.

  1. n0fx

    n0fx New Member

    I have ISPConfig 2.2 setup with two network cards. One NIC has an internal IP address, while the other one has a WAN IP. Sometimes the WAN IP crashes and stops responding to web requests in both port 80 and 81 (ISPConfig). I can still reach the server if I use the internal IP address on both ports 80 and 81.

    Has anyone else experience this issue before? I had a feeling that maybe someone is DDosing my server but I'm not too sure if that's the case or that particular part just keeps crashing. I have to reboot the server in order to get it back to listen on the WAN IP and have the website load.

    I only have one site setup on the ISPConfig server. When I try to load the site from the outside DNS name, it tries to connect to the site, it looks like it gives a response but then just times out.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Could be an issue with your network card. Do you have a spare one that you can try?
     
  3. n0fx

    n0fx New Member

    I'll give that a try, thanks for the suggestion. I'll let you know how it comes out.
     
  4. n0fx

    n0fx New Member

    Falko,

    Sorry to reply so late but I switched out the network card on the server with an Intel one. It started to work with no problems for a year but now, I'm having the same issue again.

    I can access the website from the Internal network fine. All the pages load but when I try to browse the website from the external WAN IP (direct connection from cable modem to the network card, it doesn't load.

    I tried to disable fail2ban on the server to see if it was blocking connections but that didn't help. I looked under /etc/apache2/vhosts/Vhosts_ispconfig.conf file. There was 3 entries that looked a little strange.

    It read like this:

    ###################################
    #
    # ISPConfig vHost Configuration File
    # Version 1.0
    #
    ###################################
    #
    NameVirtualHost 10.4.1.x:80 (my internal ip address)
    <VirtualHost 10.4.1.x:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>
    </VirtualHost>
    NameVirtualHost 1.2.3.4:80 (EXTERNAL IP ADDRESS FROM ISP)
    <VirtualHost 1.2.3.4:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>
    </VirtualHost>
    NameVirtualHost 1.2.3.4:80 (same IP as last entry, double entries!)
    <VirtualHost 1.2.3.4:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: www.mywebsite.com:80
    ######################################
    #
    #
    <VirtualHost 1.2.3.4:80> (same as above WAN IP)
    SSLCertificateChainFile /var/www/web1/ssl/gd_bundle.crt
    ServerName www.mywebsite.com:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web1/web
    ServerAlias mywebsite.com
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 in$
    Alias /cgi-bin/ /var/www/web1/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web1/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_flag safe_mode Off
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    Alias /error/ "/var/www/web1/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html
    ErrorDocument 401 /error/authorizationRequired.html
    ErrorDocument 403 /error/forbidden.html
    ErrorDocument 404 /error/fileNotFound.html
    ErrorDocument 405 /error/methodNotAllowed.html
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>
    </VirtualHost>
    #
    <IfModule mod_ssl.c>
    <VirtualHost 1.2.3.4:443> (same ip as above)
    SSLCertificateChainFile /var/www/web1/ssl/gd_bundle.crt
    ServerName www.mywebiste.com:443
    ServerAdmin [email protected]
    DocumentRoot /var/www/web1/web
    ServerAlias mywebsite.com
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 in$
    Alias /cgi-bin/ /var/www/web1/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web1/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_flag safe_mode Off
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    SSLEngine on
    SSLCertificateFile /var/www/web1/ssl/www.mywebsite.com.crt
    SSLCertificateKeyFile /var/www/web1/ssl/www.mywebsite.com.key
    Alias /error/ "/var/www/web1/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html
    ErrorDocument 401 /error/authorizationRequired.html
    ErrorDocument 403 /error/forbidden.html
    ErrorDocument 404 /error/fileNotFound.html
    ErrorDocument 405 /error/methodNotAllowed.html
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 for$
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>
    </VirtualHost>
    </IfModule>
    #
    #


    When I run the restart apache command, I get this error:

    goldmine:/etc/apache2/sites-available# /etc/init.d/apache2 restart
    Restarting web server: apache2[Mon May 20 16:55:16 2013] [warn] NameVirtualHost 1.2.3.4:80 has no VirtualHosts
    ... waiting [Mon May 20 16:55:17 2013] [warn] NameVirtualHost 1.2.3.4:80 has no VirtualHosts

    I edited the /etc/apache2/vhosts/Vhosts_ispconfig.conf file and took out the duplicate external IP addresses and the error went away but the external IP website still doesn't work. I restarted apache and the error went away but still couldn't connect.

    This is my ifconfig:

    eth0 Link encap:Ethernet HWaddr 00:02:a5:4f:19:84
    inet addr:1.2.3.4 Bcast:1.2.3.5 Mask:255.255.255.248
    UP BROADCAST MULTICAST MTU:1500 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)

    eth2 Link encap:Ethernet HWaddr 00:06:5b:fc:6c:17
    inet addr:10.4.1.x Bcast:10.4.1.x Mask:255.255.255.0
    inet6 addr: fe80::206:5bff:fefc:6c17/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:1001815 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1452157 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:69329704 (66.1 MiB) TX bytes:2144385908 (1.9 GiB)
    Interrupt:29

    eth3 Link encap:Ethernet HWaddr 00:02:a5:4f:19:85
    inet addr:1.2.3.4 Bcast:1.2.3.4 Mask:255.255.255.248
    inet6 addr: fe80::202:a5ff:fe4f:1985/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:2086 errors:0 dropped:0 overruns:0 frame:0
    TX packets:4123 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:347250 (339.1 KiB) TX bytes:1004545 (981.0 KiB)

    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:215 errors:0 dropped:0 overruns:0 frame:0
    TX packets:215 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:19597 (19.1 KiB) TX bytes:19597 (19.1 KiB)

    The physical network is setup with 3 network cards. The first one is the built-in Dell one with dual nics (the one with 10.4.1.x), another is an Intel card with one port, which is the set with the external WAN IP. This card originally connected to the cable modem. Last, is the newest Intel dual nic card, which I replaced the faulty Intel one above, which has the external wan IP configured it. This port is connected to the cable modem, other was not setup with an IP or connected with any wiring.

    I SSH'd into the box with the internal IP address and pinged the external IP and it responds with a ping but it doesn't work when I'm from the outside.

    This is a really weird problem and I can't seem to figure it out. I already tried reloading the machine (rebooting), disabling the eth0 interface (ifconfig eth0 down), modifying the /etc/apache2/vhosts/vhosts_ispconfig.conf file. Restarting /etc/init.d/apache2.

    I'm running ISPConfig v2.2 on a debian 5.0.1 (lenny) with one default site. There are no other websites being hosted other than my main site. I tried also looking at /etc/apache2/httpd.conf but the file is totally empty (no text in there). I don't know if ISPConfig uses that file or not, so I couldn't troubleshoot it from that aspect.

    Any help would be appreciated.
     

Share This Page