Port Forwarding Issue


#1

On an Ubuntu Server 16.04 I installed owncloud and i can use it normally on the server computer. I am new using ownCloud and i don't know which ip i must forward on my router.

Expected behaviour

I should be able to connect from anywhere to the Ubuntu/owncloud server.

Actual behaviour

I can only connect from the Server machine.

Server configuration

Operating system: Ubuntu Server 16.04

I Only need to know if i need to forward any other port than the 80 and which ip i am supposed to put both in the web browser and on the ipAdress for port forwarding.


#2

Every server needs a static ip address. Choose anyone of your home subnet and configure your Ubuntu server with it: https://www.howtoforge.com/linux-basics-set-a-static-ip-on-ubuntu
Internal you can use ownCloud with this ip address then.

The static ip address will give you the security that DHCP won't change the ip address of the server any time.

The used ip address will be used for port forwarding then. Additional to that you'll need a static (public) ip address for your router/ FritzBox by your ISP. This one will be used for DNS and requests via the Internet.


#3

How can I set my router's ip from DHCP to static? Do I have to contact with my ISP? And also what are the disadvantages of having an static ip address? Thanks for everything


#4

Public static ip addresses by ISP cost something. Sometimetimes they are included. You have to call your ISP and they will configure it/ are saying what to do.

Every company with data centers or self hosted web sites has got that.

Disadvantages:
- costs
- You have got your static ip address for a longer time. So other people/ companies can find you easier, if you visited their homepage or did something like downloads.


#5

I have now moved to Ubuntu Server 16.04 but still can't make it work, on the link that you sent I got stucked on the step 3
- 4. This is what I wrote inside /etc/network/interfaces (
This file describes the network interfaces available on your system
and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

The loopback network interface
auto lo
iface lo inet loopback

The primary network interface
auto ens33
iface ens33 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.175.2
dns-nameservers 8.8.8.8

)
When I restart the eth0 it just keeps the same way when I run ifconfig, the same ip address is there. Also I already got the static ip from my ISP so thanks for that.


#6

If you need something for a latest Ubuntu version, Google can help...
Did you restart the interface? http://www.configserverfirewall.com/ubuntu-linux/ubuntu-set-static-ip-address/