-1

In my company, we just bought a server and now we want to set a static IP to it.
Well, I've contacted my ISP and they said that they can give me static IP. So far, so good.


My question is, where should I point this IP?
Should it point to a router or directly to server(is this even possible?)

We have ESXi running on server, so every aspect(Mail,Apache,etc), have their own IP. Should I set a DNS server and point static IP to DNS server? I'm confused.

Thanks for your help.

intelis
  • 175
  • 2
  • 10
  • If you have other servers running with their own IP, why not talk to whoever helped set those up and/or documented their setup to learn how this is configured already in your environment? – Rex May 17 '13 at 13:41

3 Answers3

2

It does not matter which system gets this IP. You can give it to your gateway and use NAT internally, and you can give it to the server. In the second case the gateway needs to know where to route this IP to.

Hauke Laging
  • 5,157
  • 2
  • 23
  • 40
  • thanks, but what about firewall? should i set firewall on gateway or on server? – intelis May 17 '13 at 13:29
  • @intelis That depends on it whether you want to protect the server against accesses from the LAN, too. In that case you need the firewall on the server. In general traffic should be blocked as early as possible (i.e. on the gateway). So you may filter both on the gateway and on the server itself. – Hauke Laging May 17 '13 at 13:35
2

Your IP address will most likely be routed to your company's Internet firewall or router (this is typical for single static addresses). You can then forward ports from your router to services hosted on your ESXi server - your VMs will have private IP addresses (e.g. 192.168.1.100).

For example, for Apache, you can forward all connections to your static IP on port 80 (HTTP) to your web-server, whose IP address is 192.168.1.147, dropping all other traffic. Your firewall will then transparently forward connections on port 80 to your web-server - this is called Destination Network Address Translation, or DNAT.

Craig Watson
  • 9,370
  • 3
  • 30
  • 46
  • great, but what if i want to have subdomains? i guess that this is handled by the server right, because IP is the same? – intelis May 17 '13 at 13:52
  • Subdomains are handled by DNS, so yes, you will need to use Apache virtual hosts to use subdomains. – Craig Watson May 17 '13 at 14:22
1

Point it to the router, then set up a port forwarding rule for all the needed services to the server's internal IP address.

Nathan C
  • 14,901
  • 4
  • 42
  • 62