Roman's picture

Hello all,

I have a quick question. I am runnig different apps as virtual machines. I would like to specify different ports to be used with every application. For example, if I have TurnKey Tracks running at 192.168.1.165 and Deki on 192.168.1.166, I would like to use port 8160 and 8161 respectively. So to log in to Tracks, I would use 192.168.1.165:8160

How can I have this done? The reason behind it is that I want to have access to these apps from outside of my network, but my router only allows me to open ports once per IP.

 

Thank you,

Roman S.

Forum: 
Jeremy Davis's picture

I'm guessing that you are forwarding the ports and accessing your appliances offsite? If so most sonsumer modem/routers that do NAT forwarding allow you to redirect ports. So externally (i.e. from the internet) you use the port you choose (and have configured in your router) but internally all the appliances use their default port. In that case nothing needs to be changed. You will need to consult your router docs and/or the internet to work out how to do that (cause they all do it a little differently).

If that doesn't suit you and/or your router doesn't support that and/or you want the ports to be consistent internally and externally you may be able to use NAT and configure the port forwarding the same in your VM environment (I know that both VirtualBox and VMware can do that - or at least VMware used to be able to... long time since I've used it). Again consult the docs for your software for config.

The third option is to actually configure the ports listened to by your appliances. Again it will depend on the appliance in question (some use Apache, some use LigHTTPd, some use other stuff and Webmin actually has it's own mini server). So you'll need to work out what software you'll need to adjust and then adjust as relevant. Apache is really easy (and probably most common). IIRC you need to adjust /etc/apache2/ports.conf and you may need to double check the actual site config too (if it's listening on a wildcard that's fine, otherwise you'll need to change the port to match the one you set in ports.conf. I'm not sure of LigHTTPd OTTOMH. But once you've worked out what it is you need to adjust then google should get you going no worries (keep in mind that TKL is based on Debian - v12.x is based on Squeeze; v13 on Wheezy).

Add new comment