Change port forwarding

Ask all your questions regarding OC 4.x and older. Please read the Support Forum Rules
Forum rules
Before you post; make sure you are using at least PHP Version 5.3.x - Also read How To Solve Problems By Yourself

Change port forwarding

Postby neilstarling » Fri Jun 01, 2012 8:53 am

Hi,
We plan to use "ownCloud in a box" running as a virtual machine, along side another virtual machine running Project Open. Both machines will want to use port 80 for the http web server. Can anyone give me some help with where to changing the port settings i.e. where are the config files for owncloud/apache? I have a basic understanding of terminal and could hopefully follow some terminal commands. Thanks in advance - Neil
neilstarling
Newbie
 
Posts: 5
Joined: Fri Jun 01, 2012 8:46 am

Re: Change port forwarding

Postby marty » Fri Jun 01, 2012 12:02 pm

I don't know "owncloud in a box", is it a linux based system?
If so, can you please open a terminal and paste the output of 'uname -a', 'cat /etc/issue.net' and 'cat /proc/version'?
marty
Starter
 
Posts: 72
Joined: Tue Mar 20, 2012 1:40 pm

Re: Change port forwarding

Postby marty » Fri Jun 01, 2012 12:09 pm

Perhaps I didn't read carefully enough: You will be running two separate VMs, each of which will have its own IP adress - so there really shouldn't be any problems...

Or do you plan to run these VMs on a host that NATs the network?
marty
Starter
 
Posts: 72
Joined: Tue Mar 20, 2012 1:40 pm

Re: Change port forwarding

Postby PeakSpray » Fri Jun 01, 2012 12:43 pm

Just change the listening port from apache/nginx or whatever webserver to port 81 for example!
Then you can do 1to1 NAT. An other solution could be PAT instead of NAT.

Example NAT (Network Address Translation)

WANIP -> INSTANCE1 -> INCOMING 80 MAPPED 80
WANIP -> INSTANCE2 -> INCOMING 81 MAPPED 81

Example PAT (Port Address Translation)

WANIP -> INSTANCE1 -> INCOMING 8000 MAPPED 80
WANIP -> INSTANCE2 -> INCOMING 8001 MAPPED 80

Regards,
Daniel
PeakSpray
Newbie
 
Posts: 1
Joined: Fri Jun 01, 2012 12:39 pm
Location: Germany, Aachen

Re: Change port forwarding

Postby Elxiliath » Fri Jun 01, 2012 2:18 pm

You could also operate the different instances in different folders with multiple SQL Databases, still using the same port. Site A would be site.com/owncloud1 and site B would be site.com/owncloud2

All you would have to do us specify the the correct root folder in apache and add the multiple instances of owncloud.
Elxiliath
Newbie
 
Posts: 7
Joined: Sun May 27, 2012 5:03 am

Re: Change port forwarding

Postby neilstarling » Fri Jun 01, 2012 5:33 pm

Thanks for the replies. A bit more info to help explain the issue.

Owncloud will be running as a virtual machine, with as you say, its own ip address, say, 192.168.1.79

Project open will also be running as a virtual machine with say 192.168.1.89

Problem comes when I want to access from outside the LAN using dyndns to my ip say 86.160.226.199. I have to forward port 80 in my router to one of the virtual machines, I can't forward port 80 to both machines. So I was hoping to say forward port 80 to project open and 81 to owncloud. Therefore where/how can I change owncloud to use port 81.

Apologies if my first post was less than clear and helps with a solution, thanks in advance, Neil
neilstarling
Newbie
 
Posts: 5
Joined: Fri Jun 01, 2012 8:46 am

Re: Change port forwarding

Postby dirkk0 » Fri Jun 01, 2012 7:15 pm

Are you on running the Apache2 web server? Then you need to change the port in the conf like so:
http://goo.gl/yuHeO
And don't forget to restart.
dirkk0
Beginner
 
Posts: 12
Joined: Wed May 16, 2012 5:15 pm

Re: Change port forwarding

Postby marty » Sat Jun 02, 2012 10:01 pm

neilstarling wrote:Owncloud will be running as a virtual machine, with as you say, its own ip address, say, 192.168.1.79
Project open will also be running as a virtual machine with say 192.168.1.89

Problem comes when I want to access from outside the LAN using dyndns to my ip say 86.160.226.199. I have to forward port 80 in my router to one of the virtual machines, I can't forward port 80 to both machines. So I was hoping to say forward port 80 to project open and 81 to owncloud. Therefore where/how can I change owncloud to use port 81.

Now, this is something completely different and has nothing to do with virtualization or owncloud or apache.
I don't know what model your router is, but I have yet to come across a model that couldn't forward like this:
Project open: your_external_ip:80 -> 192.168.1.89:80
Owncloud: your_external_ip:81 -> 192.168.1.79:80

This is about port forwarding, read http://portforward.com/english/routers/port_forwarding/
marty
Starter
 
Posts: 72
Joined: Tue Mar 20, 2012 1:40 pm

Re: Change port forwarding

Postby neilstarling » Sun Jun 03, 2012 9:11 am

owncloud-ip.jpg
owncloud-ip.jpg (89.5 KiB) Viewed 5874 times


Thanks Marty, you are spot on with the problem I have and sorting it on the router would be the easiest. My router is the latest BT Home hub 3 (BT infinity 76.3 meg down19.5 meg up!!!) However, as you can see from the screen grab this is the only place to type 192.168.1.88:80, but it comes up with the error:

The IP address you've entered is invalid. Please try again using four numbers between 0 and 255, separated by dots '.' (e.g. 192.168.1.45). You can't use spaces.

Is this the sort of entry you were thinking off? Thanks for your help and understanding the issue.....
neilstarling
Newbie
 
Posts: 5
Joined: Fri Jun 01, 2012 8:46 am

Re: Change port forwarding

Postby marty » Sun Jun 03, 2012 10:06 am

Hi Neil,

I don't exactly know how to setup the router you're using... This guide suggests you first create an entry for "Game & Application Sharing" which you then use in the menu depicted in your screenshot:
http://portforward.com/english/routers/ ... tguide.htm

You might have to create 2 entries in "Application Sharing", one for VM1 and another for VM2. Be sure to use two different external ports like below:
Project open: your_external_ip:80 -> 192.168.1.89:80
Owncloud: your_external_ip:81 -> 192.168.1.79:80
marty
Starter
 
Posts: 72
Joined: Tue Mar 20, 2012 1:40 pm

Next

Return to OwnCloud Community Edition 4.x and older

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests