LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-02-2008, 10:03 PM   #1
cantdrive55
LQ Newbie
 
Registered: Sep 2006
Posts: 12

Rep: Reputation: 0
Cannot View Server Outside Network


I just setup a Linux box running Ubuntu-7.10 to serve as my home's file server as well as being a Torrent box. I followed several different How-To's and got it all up and running. However I've run into a bump with the Apache server. I have it setup so that I can add/remove/seed torrents remotely when I'm not on my network at home. When I point my browser to http://localhost it works fine, also when I use my IP. But as soon as I leave my home network and try to use it say at school, nothing comes up. I type in my dedicated IP but nothing happens. I tried pinging it but it comes back as "Destination Net Unreachable" I asked a friend to try pinging it from his house and it seemed to work for him but he couldn't view the page.

Any ideas as to what might have gone wrong?

Thanks,
Jeff
 
Old 04-02-2008, 10:03 PM   #2
cantdrive55
LQ Newbie
 
Registered: Sep 2006
Posts: 12

Original Poster
Rep: Reputation: 0
Cannot View Server Outside Network

I just setup a Linux box running Ubuntu-7.10 to serve as my home's file server as well as being a Torrent box. I followed several different How-To's and got it all up and running. However I've run into a bump with the Apache server. I have it setup so that I can add/remove/seed torrents remotely when I'm not on my network at home. When I point my browser to http://localhost it works fine, also when I use my IP. But as soon as I leave my home network and try to use it say at school, nothing comes up. I type in my dedicated IP but nothing happens. I tried pinging it but it comes back as "Destination Net Unreachable" I asked a friend to try pinging it from his house and it seemed to work for him but he couldn't view the page.

Any ideas as to what might have gone wrong?

Thanks,
Jeff
 
Old 04-02-2008, 10:16 PM   #3
thebouv
Member
 
Registered: Aug 2007
Distribution: RHEL, Fedora, Ubuntu
Posts: 64

Rep: Reputation: 16
So, what type of internet connection do you have?

Do you have a router?

If this is your home network, I'm guessing you have something like a cable or dsl modem, perhaps going into a small router. If so, do you have port forwarding configured on the router to send traffic to your server?

When you say you try your IP and it works when you're at home, you mean your public IP address right? Not your internal network private IP right?

Just trying to get clarification.
 
Old 04-03-2008, 01:43 AM   #4
rvca
LQ Newbie
 
Registered: Dec 2005
Location: Vancouver
Distribution: Debian/Ubuntu
Posts: 29

Rep: Reputation: 15
Hi,

There are several possibilities. How do you connect to the internet? Do you have a home router? If so... Are you using your router's configuration to point to your box?
Try doing this:

Code:
sudo ipconfig
should give you your ip, if this ip begins with 192 or 168 chances are your router is not letting anything outside your network go in. And we could help you with that.

Now, if it's connected directly to the internet you might be being blocked by a firewall.

For both cases you will need a dynamic ip address that you can easily get at dyndns.org and ddclient installed in your box (connected directly) or user and password configured in your router. The dynamic address will be something like: wow.homelinux.net.

So, short: Router? and... What's your IP?
 
Old 04-03-2008, 10:12 AM   #5
cantdrive55
LQ Newbie
 
Registered: Sep 2006
Posts: 12

Original Poster
Rep: Reputation: 0
I have a Motorola cable modem then a Linksys WRT54GS connected to that. The Linux box is hardwired to the linksys router with a static IP. I have gone in and made sure that port 80 is forwarded to the Linux box by the Linksys router. And when I say I try my IP I am using my public IP.
 
Old 04-03-2008, 10:17 AM   #6
cantdrive55
LQ Newbie
 
Registered: Sep 2006
Posts: 12

Original Poster
Rep: Reputation: 0
I have a Motorola cable modem and then a Linksys WRT54GS connected to that. My linux box connects via hardwire to the Linksys router. I have set a static IP on the linux box of 192.168.1.109 and gone into the Linksys config and forwarded port 80 to that IP.

I made an account at no-ip.com to see if it would work but it does the same thing. It can't reach it outside the network but on the internal it works fine.
 
Old 04-03-2008, 11:17 AM   #7
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Rep: Reputation: 31
Your ISP might have port 80 blocked. Have you tried something like running apache on a non standard port such as 8080, then going to that ip:8080?

Before we moved, our local ISP did that, but now I have it wide open.
 
Old 04-03-2008, 07:55 PM   #8
cantdrive55
LQ Newbie
 
Registered: Sep 2006
Posts: 12

Original Poster
Rep: Reputation: 0
I tried to setup apache to listen on port 8080 but I'm not sure how to do that right. I went to my httpd.conf file and its blank but I have a ports.conf and changed it from 'Listen 80' to 'Listen 8080' and made my router forward port 8080 to the linux setup. Still not able to get anything from the outside.
 
Old 04-04-2008, 06:38 AM   #9
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
School -> Internet -> ISP -> Modem -> Router -> Home server ; Does not work.
Friend -> Internet -> ISP -> Modem -> Router -> Home server ; Maybe.

'traceroute' may offer some clues.
Port blocking at ISP, home firewall rules are possibilities if you are confident that the modem and router are configured correctly.
 
Old 04-04-2008, 08:40 AM   #10
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Rep: Reputation: 31
I am not sure on Ubuntu's apache conf, I will put up a quick vm of it sometime today, but the other q's, once you changed the ports file, could you still get in from the local network? Did you have to change the URL to include the :8080 ?

But, to start, I would grab a copy of a port scanner like nmap for linux. Next, make sure apache is listening on 8080, and it is restarted. Make sure no firewall is running and then just port scan that box;
nmap -P0 serverip <enter>, after a few min's, it will come back with any open ports that box is listening on, if you see 80, then apache is setup wrong, if you see 8080, then apache is right, and we can goto the next step, the outside world.

Start there, I will get a copy of vm up shortly.
 
Old 04-04-2008, 02:10 PM   #11
rvca
LQ Newbie
 
Registered: Dec 2005
Location: Vancouver
Distribution: Debian/Ubuntu
Posts: 29

Rep: Reputation: 15
Hi,

Sorry for the delay. Ok, so far you're ok. Now, your IP is NOT 192.168.1.109, don't use this from the outside. If you go to your Linksys at 192.168.1.1 :

(1) If you go to the STATUS tab you'll see information like this:
Code:
Firmware Version:   v4.30.7, Jun. 20, 2006      
           Current Time:   Fri, 04 Apr 2008 11:01:40      
           MAC Address:   00:1B:FC:73:AC:1F      
           Router Name:   WRT54GL       
           Host Name:          
           Domain Name:    shaw.ca.       
  Internet
         
  Configuration Type
        Login Type:   Automatic Configuration - DHCP      
           IP Address:   128.189.169.19      
           Subnet Mask:   255.255.255.0   
           Default Gateway:   128.189.169.254   
           DNS 1:   137.82.27.42      
           DNS 2:   137.82.1.1      
           DNS 3:   142.103.1.1      
           MTU:   1500
Your external IP is the one here. (128.189.169.19) This is the one you'll use from the outside, this and the rest are set, in my case, automatically.

(2) If you go to the APPLICATIONS AND GAMING tab, be sure that you have marked the "enabled" box in the appropriate Port Range Forward sub-tab, and something like this:
Application "whatever" Start: 80, End: 80, Protocol Both. Ip: 192.168.1.109.

(3) You will see in the SETUP tab a sub-tab called DDNS (Dynamic DNS) there you'll set up your dynamic account. I recommend using DYNDNS, it's in the list. You go to dyndns, set up an account, set your username and password here and voila.

It should work. Cheers,

>>>> with your setting forget about ddclient (it's a pain in the butt to set it up, use your router's capability for ddns, easier =) ) uninstall it.

Last edited by rvca; 04-04-2008 at 02:12 PM.
 
Old 04-04-2008, 02:24 PM   #12
rvca
LQ Newbie
 
Registered: Dec 2005
Location: Vancouver
Distribution: Debian/Ubuntu
Posts: 29

Rep: Reputation: 15
If you want to learn, here's a good tutorial about the concepts of networking and how to set up all dns related stuf

http://www.aboutdebian.com/dns.htm


and... if you're really interested in networking and what you could do with it, here's a very good and concise document

http://www.aboutdebian.com/network.htm

Here you'll find a lot of diagrams of how it all works, you'll understand the ip numbers and most of all you'll learn to secure your sever from any attacks (veeeeeery important). Remember that Ubuntu is very close to Debian, so you could manage with this tutorial, but is not a "do step-by-step document", it's about understanding how it all works, so if one day you want to expand your server to have a mail server, ftp, dns server, and even use your linux box as firewall.. here's the brains about it.

>>> IMPORTANT: this tutorial is a bit old, some of the software in these pages is deprecated, search for your distro's tutorials later.

Cheers,
 
Old 04-06-2008, 12:18 PM   #13
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
I merged your two threads together.
 
Old 04-14-2008, 12:02 PM   #14
cantdrive55
LQ Newbie
 
Registered: Sep 2006
Posts: 12

Original Poster
Rep: Reputation: 0
I finally got it working so thanks to everyone who helped. I ended up uninstalling the whole lamp package and reinstalling it and followed your tips.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I view other computers on a mixed OS Network? geotev Linux - Networking 2 07-13-2007 01:44 AM
Can Scan for Wireless Network.. view it..but cant connect?! Damien295x Fedora 8 10-14-2006 12:24 AM
How do I view currently attached network users prior to restarting our server? Jaizey Linux - Networking 4 01-10-2006 11:21 PM
How to view other computers in the network skie_knite007 Linux - Networking 1 07-14-2005 12:32 PM
View network speed on all connections Quantum0726 Linux - Networking 1 07-11-2005 02:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration