Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 2nd March 2009, 10:15 PM
jflesher's Avatar
jflesher Offline
Registered User
 
Join Date: May 2007
Location: USA
Age: 52
Posts: 258
HTTPD Dual Nic using eth1 instead of eth0

I've just setup Fedora 10 x64 on a Supermicro 7045 with dual nic; I setup a web site and ran into a strange problem; I can't see my website from outside my LAN; checking IP on Internet it sees my IP as coming for my dynamic IP (IP of router/switch) and not my static IP.

eth0: Static IP
eth1: Dynamic IP

These are standard Intel® 82563EB Dual-Port Gigabit Ethernet Controller.
Is there a way to specify the order in which it sees the nic ports?
I'm wonder if I can mix Static and Dynamic IP's; on the outside they resolve to a static IP; the dynamic one shows up as my router/switch IP; but it allows me to access my DHCP computers; this isn't a web server; but a development machine for writing PHP apps.

ifcfg-eth0
# Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=none
DNS1=123.123.123.1
GATEWAY=123.123.123.2
HWADDR=00:30:48:7f:0a:66
IPADDR=123.123.123.3
NETMASK=255.255.255.240
ONBOOT=yes
SEARCH="mydomain.net"
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
NM_CONTROLLED=yes
PEERDNS=yes

ifcfg-eth1
# Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper)
DEVICE=eth1
HWADDR=00:30:48:7f:0a:67
ONBOOT=yes
SEARCH="mydomain.net"
BOOTPROTO=dhcp
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
NM_CONTROLLED=yes
PEERDNS=no

Where 123.123.123.3 is my static IP address.
I should mention that nmap -v -p 80 123.123.123.3 shows an open port on 80

My VirtualHost is setup like:

NameVirtualHost 123.123.123.3
<VirtualHost 123.123.123.3>
ServerName www.mydomain.com
ServerAlias mydomain.com *.mydomain.com
DocumentRoot /var/www/html/mydomain
ServerAdmin webmaster@mydomain.net

RewriteEngine On
RewriteOptions Inherit

ServerSignature Off
DirectoryIndex index.php index.html index.htm index.shtml

SSLEngine off
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
SSLOptions

TransferLog logs/access_log
ErrorLog logs/error_log
LogLevel error
HostNameLookups on
</VirtualHost>

<Directory "/var/www/html/mydomain">
AllowOverride all
Allow from all
</Directory>

Thanks
Jeff
__________________
A Binary Bit lost in Binary Bit LAN
Vets Help Center
My Smolt Profile
Reply With Quote
  #2  
Old 2nd March 2009, 10:36 PM
blittle Offline
Registered User
 
Join Date: Jun 2007
Posts: 397
httpd.conf

Code:
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80
by default httpd will listen on all interfaces, you can force it to listen on only one IP address by modifying the line listed
__________________
My Smolt Profile
Reply With Quote
  #3  
Old 2nd March 2009, 10:41 PM
jflesher's Avatar
jflesher Offline
Registered User
 
Join Date: May 2007
Location: USA
Age: 52
Posts: 258
If I change it to:
Listen 123.123.123.3:80
HTTPD fails to start.
__________________
A Binary Bit lost in Binary Bit LAN
Vets Help Center
My Smolt Profile
Reply With Quote
  #4  
Old 2nd March 2009, 10:42 PM
blittle Offline
Registered User
 
Join Date: Jun 2007
Posts: 397
what do your logs say?

are you using selinux?
__________________
My Smolt Profile
Reply With Quote
  #5  
Old 2nd March 2009, 11:03 PM
jflesher's Avatar
jflesher Offline
Registered User
 
Join Date: May 2007
Location: USA
Age: 52
Posts: 258
I couldn't find any errors in log files; I changed it and did a service httpd restart; it said FAILED.

I have seLinux disabled.
The Firewall is open for HTTP/80.
__________________
A Binary Bit lost in Binary Bit LAN
Vets Help Center
My Smolt Profile
Reply With Quote
  #6  
Old 2nd March 2009, 11:08 PM
jflesher's Avatar
jflesher Offline
Registered User
 
Join Date: May 2007
Location: USA
Age: 52
Posts: 258
By the way, Thanks for the help.

You might want to update your My Smolt Profile to something like http://www.smolts.org/client/show_al...8-a2c1e2d516c8, the new system switched to a public ID; I got to poking around and posted a new thread on this issue.

I just wanted to see what your profile was, I see you are using a Lap Top; but it might be outdated; since it still shows you running F7; unless you are. You can update it using ssmoltSendProfile

I added my Smolt profile link to my signature after seeing yours, good idea.
__________________
A Binary Bit lost in Binary Bit LAN
Vets Help Center
My Smolt Profile

Last edited by jflesher; 3rd March 2009 at 12:05 AM. Reason: Update
Reply With Quote
  #7  
Old 3rd March 2009, 12:00 AM
blittle Offline
Registered User
 
Join Date: Jun 2007
Posts: 397
yeah I'm just too lazy to change it :-)

so nothing in /var/log/messages or in /var/log/httpd

hmm strange

try running these commands (to validate your current httpd.conf file)

# httpd -t
# httpd -S

those should return something along the lines of "Syntax OK"

if not, look at the specific lines that are mentioned.

try opening another shell and doing this while starting httpd

tail -f /var/log/httpd-error.log

or afterwards by checking this:

egrep -i 'warn|error' /var/log/httpd-error.log

make sure your DNS client is working aka-your hosts file has a correct entry for this host

123.123.123.123 mywebserver.mydomain.com #should be something along these lines

check the hostname applied to your host and make sure it's the one that's listed in httpd.conf

see what processes are using port 80 and 443, maybe something else has taken those ports so apache can't start correctly

also, if your logs have gotten bigger than 2 Gb they may have been rotated, make sure you're looking at the right logs

edut-btw this should start apache in "debug" httpd -X

that will probably shed some more light on this problem
__________________
My Smolt Profile

Last edited by blittle; 3rd March 2009 at 12:02 AM.
Reply With Quote
  #8  
Old 3rd March 2009, 12:37 AM
jflesher's Avatar
jflesher Offline
Registered User
 
Join Date: May 2007
Location: USA
Age: 52
Posts: 258
I get what the setting are and Syntax OK.

If I turn off my eth1 it works fine; its not the HTTP settings its the Dual Nic card.

I have a feeling its due to the Static and Dynamic IP addresses on the same card; I hate to say this; but it was working in Windoze 2003 Server x64 R2.
__________________
A Binary Bit lost in Binary Bit LAN
Vets Help Center
My Smolt Profile

Last edited by jflesher; 3rd March 2009 at 12:38 AM. Reason: Spelling
Reply With Quote
  #9  
Old 3rd March 2009, 12:40 AM
blittle Offline
Registered User
 
Join Date: Jun 2007
Posts: 397
did you try and use debug mode on apache to see what output it generates?
__________________
My Smolt Profile
Reply With Quote
  #10  
Old 3rd March 2009, 12:45 AM
jflesher's Avatar
jflesher Offline
Registered User
 
Join Date: May 2007
Location: USA
Age: 52
Posts: 258
I don't think it will help; it works fine from my LAN; I have 6 servers, I can access it from all of them; its just outside my LAN, or from the Internet, that the problem exist; from the outside it seems to be using eth1 which is my router/switch; inside my LAN it seems to resolve to eth0; don't know why that is; nor do I understand why its using eth1 instead eth0; but that is the problem in a nut shell.
__________________
A Binary Bit lost in Binary Bit LAN
Vets Help Center
My Smolt Profile
Reply With Quote
  #11  
Old 3rd March 2009, 10:05 PM
blittle Offline
Registered User
 
Join Date: Jun 2007
Posts: 397
by default apache listens on all available interfaces as far as I know, the config is basically listen 0.0.0.0 just like any other service.

You should be able to define it like I showed above, why it's not working in your case I can't say at this point.
__________________
My Smolt Profile
Reply With Quote
  #12  
Old 3rd March 2009, 10:19 PM
jflesher's Avatar
jflesher Offline
Registered User
 
Join Date: May 2007
Location: USA
Age: 52
Posts: 258
I have disabled eth1 for now; till I can figure out how to set it up correctly.

With it disabled (not active) I have the same problem.

But now it works as far as the web site being able to be seen from outside my LAN.

Dual NICs shouldn't be a problem; a lot of people use them; I wonder if anyone is using a static ip on one and a dynamic ip on the other; I'll set it up with a static on both and see what happens.
__________________
A Binary Bit lost in Binary Bit LAN
Vets Help Center
My Smolt Profile
Reply With Quote
Reply

Tags
dual, eth0, eth1, httpd, nic

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
eth0 is now eth1 - how to fix? dchicks Hardware & Laptops 2 12th January 2009 11:03 PM
eth0 to eth1 tronic Servers & Networking 3 23rd January 2007 09:27 PM
eth0 -> eth1 swimm3r Servers & Networking 7 13th January 2007 08:03 PM
eth0 and eth1 pedrolopes Servers & Networking 2 19th February 2005 02:02 PM


Current GMT-time: 18:56 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat