You are not logged in.

#1 2009-05-01 01:03:56

z.s.tar.gz
Member
From: Rural Florida
Registered: 2008-12-12
Posts: 298

the home server blues

well, I recently (past few days) got a little server going at my house, but I'm having some major problems with it. First let me say what I want out of it:

Chew on torrents
Host a small website
Be a proxy for me and a few friends

I'm trying to get the website going first, and I'm having some problems.

1. I cant access it from outside my network, despite the port being forwarded and firewalls being down.

2. I'm trying to use port 1881, but when I just type in "http://192.168.1.36" (on my local) it goes through even though I'm not using port 80.

3. When trying to access from outside the network, I get a "can not connect", but not timing out. I dont know what that means, but it seems strange.

I really would like to use arch, but I may have to use ubuntu if push comes to shove.


I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581

Offline

#2 2009-05-01 01:56:35

stefanwilkens
Member
From: Enschede, the Netherlands
Registered: 2008-12-10
Posts: 624

Re: the home server blues

Hey,

We'll need a little more information smile

From what you've told us so far, you will need LAMP:
http://wiki.archlinux.org/index.php/LAMP

You say you can't connect from outside the network.. connect to what? http? mysql? ssh?

You're trying to use port 1881 for http, have you set this in /etc/httpd/conf/httpd.conf? It should be:

Listen 1881

How does your hosts.allow and hosts.deny look?

Last edited by stefanwilkens (2009-05-01 01:57:22)


Arch i686 on Phenom X4 | GTX760

Offline

#3 2009-05-01 02:00:40

z.s.tar.gz
Member
From: Rural Florida
Registered: 2008-12-12
Posts: 298

Re: the home server blues

Sorry about my vagueness, I'm using apache only at the moment, (so I guess I have LA) and have set it to listen to 1881 as perscribed by the wiki, and I can not load index.html from outside. I can, however, access it from inside, whether I add the ":1881" or not.


I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581

Offline

#4 2009-05-01 02:02:23

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: the home server blues

Can you access it via "http://192.168.1.36:1881" locally?
1 and 2 imply that you haven't configured your ports correctly (especially 2). You most likely can't forward port 80 from the external network which is what the server seems to be listening on.

What server are you running (Apache/Django/something else)?
Do you need to edit /etc/hosts.allow or /etc/hosts.deny?

Post relevant config files too.

*edit*
Sorry, didn't see your reply before I posted this.

If you can access your server with and without :1881, can you access it via other ports? What does a port scan of the server show you? (e.g. with nmap)

Last edited by Xyne (2009-05-01 02:04:52)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#5 2009-05-01 11:00:40

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: the home server blues

Does your ISP allow servers? My ISP blocks all servertraffic on ports lower than 1024, maybe your ISP blocks even more ports?

And equally important: does the network you're connecting from allow the usage of port 1881? One of the companies I work for have a policy where only specific ports are opened, so that I cannot connect to my home mailserver...

Zl.

Last edited by zenlord (2009-05-01 11:02:21)

Offline

#6 2009-05-01 11:15:59

z.s.tar.gz
Member
From: Rural Florida
Registered: 2008-12-12
Posts: 298

Re: the home server blues

I am going to say my isp blocks servers, although that is an assumption. I was really hoping I could bypass that, however, and use my server anyway.

Also, when I try to connect to it via wan from the inside, it shows me my router's config page. I think this is a mechanism of the router, however.

I am using dhcp at the moment, idk if that is a factor or not.

I'll do more research/troubleshooting later.


I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581

Offline

#7 2009-05-01 14:12:26

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: the home server blues

I still suspect that this is a configuration error. You should not be able to access your server on any random port, only the port that you've set. This indicates that something is wrong.

Try setting the server to accept connections on a higher port (10000-65535). You should only be able to access the server on that port, both internally and externally.
Double-check your router's firewall and port forwarding policy. Make sure that the router is forwarding the server's port to the server's local IP address.
Use a proxy to test the WAN connection from within the LAN. Most routers will not forward ports from inside the LAN as if the connection had come from the WAN, especially port 80 which the router uses for access to its configuration menu on the LAN.

The solution to such problems often turns out to be that you've made a mistake in something that you're sure you've set up correctly. After looking at it for too long, you end up with configuration file blindness and it becomes very difficult to detect the mistake. Just go through everything meticulously with the assumption that it's wrong. I doubt that your ISP is Spartan enough to block all ports (who would subscribe to an ISP that prevents all external connections to one's network?).

Again, if you post some configuration files (e.g. /etc/httpd/conf/httpd.conf) and give more information about your router and how you've configured it then you would increase the chances of someone being able to help you.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#8 2009-05-01 20:11:40

z.s.tar.gz
Member
From: Rural Florida
Registered: 2008-12-12
Posts: 298

Re: the home server blues

I'll take another look, as that was actually the first thing I was going to test was my router config.
I know my isp doesnt block all ports, but I suspect they block http and mail server. (this is just a hunch)

Edit: Ok, now I have it to where the port is 1771. After reviewing my configuration, my routers were forwarding the wrong ports. (one forwarded 80 and the other 1881) They are now both 1771.

Also, when connecting from the inside, apache only listens to 1771 now, as it should be. I really didn't do anything with it, only restarted the computer.

I now have to test if I can get to it from outside...

Last edited by z.s.tar.gz (2009-05-01 22:09:13)


I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581

Offline

#9 2009-05-03 11:32:19

z.s.tar.gz
Member
From: Rural Florida
Registered: 2008-12-12
Posts: 298

Re: the home server blues

Ok. So I fiddled with it some more, and it turns out my problem was the port forwarding all along. Then my hard drive went bad. Started clicking and I couldnt boot anymore. So, I scrapped it and got another hard drive.

The second hard drive wasn't any better, because it became corrupted several minutes after installing. So, I got a third hard drive. (I have quite a few hard drives)

The third hard drive is working now, but I have a problem.

I want to use ~/http instead of /srv/http, but when I do, I get a 'fail to connect error' when visiting the site. I chmod-ed ~/http for everything, but do I have to chmod my entire home folder?

I'm going to take another look at the wiki.

edit: Ok, so I found out the problem was that apache wasnt starting, Every time I started it, it would fail. So, I changed it back to /srv/http and just chmod 777 -ed it.

That should do for now.

Last edited by z.s.tar.gz (2009-05-03 11:45:40)


I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581

Offline

#10 2009-05-03 16:42:52

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: the home server blues

You can move the apache root elsewhere (I have mine in /home/http) but other users must have full read permissions (and execute for directories) along the full path to the server root.

An easier and better option is to use bindfs (http://aur.archlinux.org/packages.php?ID=22920). You could use that to create a full root in your home directory and mount it in /srv/http. The advantage of bindfs over "mount --bind", which can also get around the path permissions problem, is that you can set the permissions of the mounted directories. For example, you could mount a folder in your home directory that has write permissions as read-only in your server root. This way you don't have to change permissions on the files themselves, just the mount point when you mount it with bindfs.

Last edited by Xyne (2009-05-03 16:52:42)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#11 2009-05-03 17:42:45

z.s.tar.gz
Member
From: Rural Florida
Registered: 2008-12-12
Posts: 298

Re: the home server blues

Ill check it out. anyways, the site is working so ill make it solved.


I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581

Offline

Board footer

Powered by FluxBB