[PC-BSD] network alias

For the life of me I can't remember where to put this. I have a jail on my PC-BSD system and from the base system I want to set up an internal alias for it so I can just type "tomcat7" in my browser instead of the IP and port, where would I put this?
 
Thanks! I only ask because I made changes to /etc/hosts and it seems to have not taken effect on it's user error :OOO

edit:
Here's my /etc/hosts entry:
Code:
192.168.1.201:8080      tomcat    tomcat
 
Solved, I thought I could put the port in there.... I can't.

Code:
192.168.1.201 tomcat tomcat

Then tomcat:8080/ from the browser works fine. Thanks again for the help @fonz!
 
Last edited by a moderator:
  1. I'm not entirely 100% absolutely positively sure, but I don't think you can put port numbers in /etc/hosts. If you want all inbound traffic for the jail to be redirected to a certain port number, you may have to set up a small NAT (e.g. using PF) on the host.
  2. If your network has a domain name, add it to the middle entry: something like
    Code:
    192.168.1.201 tomcat.foobar.org tomcat
    should do it.
 
Back
Top