LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Setting up server from home (https://www.linuxquestions.org/questions/linux-networking-3/setting-up-server-from-home-380380/)

joeman3429 11-06-2005 12:18 AM

Setting up server from home
 
Hi.

Lets say that I have 2 computers behind a router

Lets say that I have apache running on the linux box in my bedroom, and lets say that I have a phpBB forum running on the aforementioned server. I can visit the forum using the other computer on my network by typing 192.168.2.2.
As I understand it, this is the IP my router chose for that comp.

My question is, can I get my IP from a site like whatismyip.com and type that in and be able to view my forum?

I went to my router setting and added this in my "Virtual Servers" page:

Inbound port: 80
Type: TCP
Private IP Address: 192.168.2.2
Private port: 80

But when I type in my IP, it takes me back to my router settings page. Can this even work? I'm sure I'm missing something.

Thanks

PB0711 11-06-2005 01:05 AM

Umm, Just thinking off the top of my head but I would say no, because the router takes the IP address from the internet and makes your home network. SO it takes 24.127.53.127 and then gives the home network 192.168.2.2 and 192.168.2.X for the other computer. This means that while on your home network you can type in the IP address and get to your computer. SO if you wanted other people, outside of your home network, to just type in the IP address, I think, you would have to have them type in your static internet IP address ie 24.127.53.127 or whatever it is and then have some 'IP forwarding' system to redirect them to 192.168.2.2.

hope this helps

PB :)

joeman3429 11-06-2005 01:22 AM

Thats what I did. I went into my router settings at made it foward port 80 to 192.168.2.2
Apache says it is using port 80, also. I know I can't type in 192.168.2.2 from an outside computer, lol:D. When I type in my ACTUAL IP, it takes me to my router settings.

My router is 192.168.2.1. Maybe because it is the first IP, thats why it goes to it automatically?

I've been looking around the internet and appearently a lot of ISPs block port 80 for security reasons. Maybe I have to set it up using a different port?

Thanks for the reply

PB0711 11-06-2005 01:31 AM

yea but if you change the port you are going to have to have that specified in the address, ie

http://192.168.2.2:50/yourforum (where the port is 50, oboviously)

You could sign up for a free webspace and direct that to your web server. SO it's just
http://www.yourforum.com
I know some people do, do that because I have a friend who does it, I'll ask and find out the name for you.

joeman3429 11-06-2005 01:51 AM

Thanks.

So theoretically if I went to whatismyip.com and it said 67.100.123.118, I should be able to type:

67.100.123.118:80

It doesn't work though, it just takes me to my router settings.

PB0711 11-06-2005 02:13 AM

lol, ok you'll probably hit me for suggesting this but just making sure. Have you made sure that the forum computer has a static IP address set up?
Also I would try one last thing if you take the router out, and place the forum comp directly on the web does it then allow you to type in it's IP address and get to the forum?
I was just looking at my settings on my router and yea it really should have worked. I mean the router is always going to be the 1st [ 192.168.x.1 ] . You know I'm really sorry for messing up your thread, but I'll point you to a really good (but long) network and http set up How to:
http://aboutdebian.com/network.htm

PB0711 11-06-2005 02:16 AM

it's like page 29 or 30 something around there that I think you want

joeman3429 11-06-2005 02:28 AM

heh, yeah.....um.......I'm pretty sure that my IP isn't static. (Hits my self) It changes a lot.....

I'm not what you would call an expert when it comes to networking....

So then I guess I'll ask: is there a way to make my DSL connection static? or is there some other method to get around this obstacle?

And just so I know, why is it so important?

I'll try hooking my comp directly to the modem now.

Thanks

PB0711 11-06-2005 03:16 AM

ok then 1st is 1st I would go into the router and make the forum computer static, if your lucky enough to have a netgear I can tell you exactly how, otherwise I'm sorry. The reason that the DSL needs to be static is becasue otherwise the forum keeps changing it's address. To be just a little over simplified about it, it's like your house moving from china to florida just because you decided to 'load' up your house. I know that with my cable my IP address does not change too much, ie it changes when my router has to be reset. Having said that there is a way to still do it useing something like DynamicDNS [ http://www.dyndns.com/ ]. But I don't really understand all of that. SORRY :( :scratch:
How to keep it static all the time, umm I think you pay for that. :(

umm also thought of one more thing is your firewall open?
there is another page that I found which is pretty good it's

http://www.lifehacker.com/software/f...all-127276.php

and I'm also going to give you this one as well:
http://ubuntuforums.org/archive/index.php/t-78814.html
because I think it's pretty good.
hope it starts working.

PB

joeman3429 11-06-2005 03:19 AM

Guess what......................
It works when I hook it directly to my modem!. It displayed my glorious homepage message:
Server is working, thank you for stopping by

It was a beautiful moment. Now... if it wasn't 1:00 AM, I'd go on some one else's computer to test it.

joeman3429 11-06-2005 03:51 AM

well, I made an account at dyndns.com and when I go to the site it made, guess what................................


It takes me to my ROUTER SETTINGS ARRRRRRG!

I'm beginning to get slightly annoyed...

And yes, I forwarded port 80 to 192.168.2.2


All times are GMT -5. The time now is 12:05 PM.