Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Ok, I have set up the php and apache and all that. And I can access the website from other LAN pcs, I can SSH into it from lan, and I can use FTP clients.

Now I wan to make it available to internet.

Here is my situation:

  • My server IP address: 192.168.1.34
  • My Router IP address 192.168.1.1
  • My public IP address: xxxxxxx

So thats all fine. What I need to do now is to make static route to the server, and than forward the ports 80 and 22, thats right?

So I know exactly how I need to do all that, but I just cant figure out what values goes where.

To set up static route i have to enter following values:

  • Destination IP Address
  • IP Subnet Mask
  • Gateway IP Address

So.. Given my IP numbers what values shoudl I enter there?

And for port forwarding i configuration menu asks for following:

  • Start Port
  • End Port
  • Server IP Address

Start port end port should be 80? And server address 192.168.1.34?

share|improve this question
    
It is a pretty bad idea to post your public IP of a server that you're still setting up/haven't hardened. Can you say "honeypot?" I'd suggest redacting that. –  Zac B Jun 26 '12 at 18:27
    
Ok edited! Anyway, I am withdrawing my question.. it looks like my set up works anyway. It didn't occured to me that I cannot access that IP from my LAN, but couple mates so far have confirmed to me that it is indeed working! :) –  vgaldikas Jun 26 '12 at 18:34
    
Then you need to set up loopback :) –  Ryqiem Jun 26 '12 at 18:55
    
whats that again?? I mean I know what loopback.. but how would it help me to access my oublic ip? And how do i do it? –  vgaldikas Jun 26 '12 at 20:16
    
nevermind the above... got it to work already :) –  vgaldikas Jun 26 '12 at 21:19
show 1 more comment

1 Answer 1

up vote 0 down vote accepted

Ok, as suggested by Brian Swift ill explain , myself here:

1st part, I ended up not doing at all. It was working fine without it as i found out. Instead I configured my Ubuntu to have static IP.

2nd port forwardin as I understand goes like this:

Start port and end port is the ports of program you want to forward, if it is a web server, you need to set them as 80, and for lets say SSH (which you want as well, cause its like magic.. it lets you administer your server from anywhere, and that is just start of what it can do)

And the IP address is the local IP address of the box. So I in my case it was 192.168.1.34.

And this is why you need to set a static IP, because if you reboot machine, and IP changes the web-server will become unaccesable.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.