SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I seem to be running into some strange DNS behavior with apache and can't figure out what's causing it. I actually asked this question about a week ago on the software thread (with no response) so I won't go over it again in detail. I will just give a brief summary and if any one is interested, you can read the details here Sorry to double post, it's just been my experience that Slackware users are more knowledgeable and willing to help. I hope enough time as gone by so no one get's mad at me for resurfacing the question.
Well anyways, it goes a little like this:
I have a local host set up that is supposed to be private from the internet:
where drkstr.org is my public domain name. Now the problem I am getting is when I enter in the url as so 'http://<MY IP>/islam/' (which is a folder that contains something for a school project) apache routs to my private 'srv.domain.com' address. At the time my domain was not registered to my IP so I would end up getting an error page from the site that hosted my domain.
My question is WTH is apache forwarding something to a private domain!? I have all of my configuration files/security set up around these two host names (dsk/srv) and the fact that apache is routing to it makes me really nervous.
I saw your original post, and couldn't make much sense of it
then, and I'm still not sure I understand your actual problem.
Apache will serve up what ever comes its way, and without
having seen the relevant sections of your httpd.conf no one
(slacker or not) will be able to answer your questions.
From your description it's totally unclear whether the machine
has two network interfaces, one of which you expect to serve
the public web-site and and one for internal only use.
You also give no indication of what kind of routing is going
on, whether the server is NATed behind a router/firewall or
what ...
Thank you for takeing the time to reply. You have a very good point. Sorry I didn't post more relevant info. Thank you for the reminder that there is probably a good reason why no one answered my question
httpd.conf is standard install. No special configurations. I can post it if you think there might be other information you need in it, but I'm not sure if it's actually a problem with apache configuration, or with the way I have DNS set up.
Network set up:
server plugs into dsl router which forwards http to my server.
Server has eth0 and eth1.
eth1 is for local network connections. eth0 for public (goes to dsl router)
I have a desktop that uses my server as a NAT gateway. The server forwards the traffic from eth1 out though eth0.
Code:
#desktop /etc/hosts
127.0.0.1 localhost
127.0.0.1 dsk.domain.com
192.168.0.101 srv.domain.com srv #eth1 on server
How/why would something get forward to the domain set as the loopback adr?
Even if you are not sure what the problem is, thank you for the feedback on posting better questions. I'm still kind of new to Linux and sometimes forget these kind of things.
It's all about the apaches configuration. If there's nothing
to deny a request from one of the interfaces all packets from
all interfaces will be served.
If it looks anything like this the world will see it:
Code:
<Directory "/var/www/htdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
and the bit in bold is your problem.
[edit]
Btw, the thread title is completely wrong; apache isn't
redirecting anything, it's just serving all interfaces as
it's told.
[/edit]
Cheers,
Tink
Last edited by Tinkster; 06-04-2006 at 07:06 PM.
Reason: [edit]
Thank you for putting up with my ignorance. I have updated the the httpd.conf to be (what I think at least) more secure. I didn't see any bold in your previous post so I took a guess at it. Would you mind takeing a look at my configuration and telling me if there is anything that jumps out at you as being poorly configured?
changes from default are in bold.
Code:
<Directory "/var/www/htdocs">
Options FollowSymLinks MultiViews #removed Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Thank you for takeing the time to look at this. I am really new to security stuff and am trying to learn the proper way to configure my home network. I don't think any real hacker will be interested in my computer, but I would like to at least keep the script kiddies out.
FYI: I changed my /etc/hosts file on both server and the desktop to point to their network device instead of the loopback. Just wanted to let you know since I use the hoste name 'srv' in my configuration.
Quote:
Btw, the thread title is completely wrong; apache isn't
redirecting anything, it's just serving all interfaces as
it's told.
Being a moderator and all, would you mind changing it to something better? Sorry for the poor title, I would have liked to of picked a better one but that would mean I actually knew what was going on
Sorry mate, I won't be doing all your work for you, I was happy to
nudge you in the right direction. I highly recommend reading a tutorial
on apache (you should have done that before you put the thing on the net).
As for the title: I'd be happy to oblige, but I only mod newbie and BSD,
can't edit anything in the other forums.
Sorry mate, I won't be doing all your work for you, I was happy to
nudge you in the right direction.
Fair enough. I will see what I can find on the internet. I do appreciate the help you have given me. At least I have some idea where to start. I will post back if there is anything I still can't figure out.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.