how to assign a server a public static IP

Discussion in 'Site & Server Administration' started by xbat, Jul 18, 2011.

  1. #1
    I am at a complete loss... I would like to know how to assign a server a public static IP... So I already got a static ip... now that I am in my router.. how would I assign that one static ip to the server itself.. Any examples will help me a great amount.. I am currenlty using some old motorola router.. But I am thinking about buying somehting new like another router or a switch... I have never done this and would like to learn out how to accomplish this.


    Thanks:eek:
     
    xbat, Jul 18, 2011 IP
  2. felz

    felz Greenhorn

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #2
    you need DNS server, that would route your local IP to your gateway and finally get to your public IP.
    Let me know your server operating system, and for what purpose you build your server?
     
    felz, Jul 19, 2011 IP
  3. xbat

    xbat Well-Known Member

    Messages:
    326
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    105
    #3
    so... if im runing bridge mode on my modem ip (10.0.0.2) Then the router gives a ip (192.168.17.5) Then in my linux server I would need to edit something along lines of /etc/sysconfig/network >/etc/sysconfig/network-scripts/ifcfg-eth0 > /etc/resolv.conf and put my outside ip static in the file itself besides the local ip ex 72.23.22.112 ?
     
    xbat, Jul 19, 2011 IP
  4. tks

    tks Well-Known Member

    Messages:
    89
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    108
    #4
    You should be able to do it by "port forwarding". You will have check with your router configuration and identify the port you need to forward.
    Eg:
    Your static IP: a.b.c.d
    LAN IP assigned to the server: 192.168.0.7
    Port: 80 (for http web server)

    Now in router, you have to define, "forward all requests on port 80 to LAN: 192.168.0.7
    In Server firewall, open the port (in our case it is port 80 / http)

    Let us know if you have further queries..
     
    tks, Jul 19, 2011 IP
  5. xbat

    xbat Well-Known Member

    Messages:
    326
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    105
    #5
    I understand that you are able to do the port forwarding.. But where would I place the info for a external static ip address where exactly? Would I edit something inside my centos linux server?
     
    xbat, Jul 19, 2011 IP
  6. xbat

    xbat Well-Known Member

    Messages:
    326
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    105
    #6
    I figured it out.. I had to bad routers, that I was using...
     
    xbat, Jul 19, 2011 IP