#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2008
    Posts
    36
    Rep Power
    7

    Dynamic Port Forward


    Not sure where the best place to post this.

    I'm running Apache on my home machine with WampServer. I have a dynamic IP. My current outside IP is 75.117.200.137.

    When I go to that IP I get my log-in router (SAGEMCOM F@ST 1704) page. I should get my webpage, correct?

    Here's how I have it set up so far:





















    hehehe


    Right now I'm not showing that port 80 is open on a online port checker. But if I change the router port 80 IP to 192.168.254.1 then port 80 shows open. But no matter if I try to see my webpage online by putting my current "outside" IP (75.117.200.137) I get my router log-in page.

    What is wrong?

    Thanks
  2. #2
  3. Jealous Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,303
    Rep Power
    9400
    That is normal behavior: the router sees a request for itself (that it its IP address after all) coming from inside the network and decides that you want to see its configuration pages.

    External DNS will point your domain name (www.example.com) to your external IP address (75.117.200.137). You need an internal DNS that points the domain name (www.example.com) to the internal IP address (192.168.255.1).
    Externally you would access the site with the external IP address, internally you would access the site with the internal IP address.

    Also you need the port forwarding so people outside can access the site.


    This is possibly just my opinion, but please
    1. Don't use the 255 octet for anything real.
    2. Keep machines on the same subnet unless you actually want them to have their own subnets (which for endpoints doesn't make sense).
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2008
    Posts
    36
    Rep Power
    7
    Thanks, I would have replied sooner but had other issues come up. hehehe

    I'm getting there I think.

    My whole set up stopped working for no good reason. Could you please take a look at this and tell me what is the problem?

    I'm trying to run two websites on my machine or at least one would be an accomplishment at this time. hehehe

    Here's my ipconfig /all command prompt:



    **************

    I deleted all my other port forwarding and I'm just focusing on one for now. Here's where I am attempting to forward port 80 to another IP (192.168.254.5). I have a dynamic IP outside of my router. I'll changed that soon but it doesn't matter right now, correct?




    I have in my Apache httpd.conf "Listen 192.168.254.5:80"

    Here's where I have my LAN settings set on my router:





    If I try to set my Local Area Connection to ANY IP I lose internet connection altogether.

    If I set my router port to 192.168.254.1 (notice the 1) and go to an online port checker it says it's open. But If I set it the way I have shown here the port checker says the port is closed. Strange. Can I use just one IP for everything?

    I have followed the instructions on YouTubes that tell how to add many IPs using Local Area Connection. But it appears that my Local Area Connection is not working at all.

    So I guess what I need to know is how to get more LAN IPs and get them routed correctly.

    I'm sure it's something simple. hehehe

    Thanks
  6. #4
  7. Jealous Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,303
    Rep Power
    9400
    There are two different sets of IP addresses: internal and external. The external set is what everybody on the outside, like open port checkers, know about. You probably only have one and it is assigned to your router. The internal set is what your computers inside your network have. The router also has an address in this set.
    One IP address belongs to one machine and one machine only. However a machine can have more than one address, like how your router has two because it's connected to two different networks.

    Port forwarding goes like this:
    - Router receives a connection to its external address on some port (like 80)
    - It looks at its configuration and sees that it should send that traffic somewhere in the internal network. Namely, your computer and port 80
    - Traffic goes between the router and your computer
    - Stuff your computer sends back goes through the router and from there back to the original source

    For your configuration:
    1. The router should be 192.168.x.1. You've chosen x=254.
    2. Apparently you can't forward ports to computer names - has to be an IP address. Would be nice but oh well. Give your computer a static address in the 192.168.x.(2-254) range. Like 5.
    - Do this in the router configuration
    - Do not do this in your TCP/IP settings*
    3. Set up your router to forward its port 80 to 192.168.x.5's (or whatever address your computer is) port 80.
    4. Make sure your computer has the right address. If not then restart your router.

    * Only one of these is necessary because the computer asks for an IP address (it can ask for anything) and the router replies with one (it can reply with anything). Changing both just means that you have to update two configurations every time you want to change something. I suggest doing it in the router for two reasons:
    1. The router has some port forwarding set up. Because of that the router needs to know that the IP address it's forwarding to is the right machine.
    2. If you want to change the address then being in the router configuration pages helps remind you that you have to change the port forwarding too.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2008
    Posts
    36
    Rep Power
    7
    Thank you.

    Now I understand. I was way over complicating things. hehehe

IMN logo majestic logo threadwatch logo seochat tools logo