Access server from outside
Hi everybody,
I have a task for school to work with technology, but I have really no experience in IT.
I have already installed Virtualbox with Ubuntu12.04.
Then I have installed Apache2 and Tomcat7 on Ubuntu12.04.
I can access Apache2 from http://localhost and Tomcat7 from http://localhost:8080.
Now my question is: how can I access these servers from outside?
Greetz,
Tine
P.S.: Sorry for my bad English...
Access server from outside
Hi everybody,
I have a task for school to work with technology, but I have really no experience in IT.
I have already installed Virtualbox with Ubuntu12.04.
Then I have installed Apache2 and Tomcat7 on Ubuntu12.04.
I can access Apache2 from http://localhost and Tomcat7 from http://localhost:8080.
Now my question is: how can I access these servers from outside?
Greetz,
Tine
P.S.: Sorry for my bad English...
Re: Access server from outside
https://help.ubuntu.com/community/Servers
get more by googling around "ubuntu remote server access"
Re: Access server from outside
Mostly this depends on whether your server is behind a router (in which case you'll need to set up port forwarding on the router) or directly connected to the Internet.
Also if you don't have a static IP, you'll need to use Dynamic DNS.
Re: Access server from outside
Does your server have an internet routeable ip? If not you would have to port forward the connections through your router.
Re: Access server from outside
Hi linuxtechguy,
I have no idea. Is there a way to check that my server has an internet routeable ip? Maybe with a command in command-line?
Thanks,
Tine
Re: Access server from outside
Code:
ip addr show # lists IP addresses for all interfaces
ip route show # outputs IPv4 routing table
Re: Access server from outside
The first code gives me:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:67:5c:40 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
inet6 fe80::a00:27ff:fe67:5c40/64 scope link
valid_lft forever preferred_lft forever
The second code gives me:
10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15 metric 1
169.254.0.0/16 dev eth0 scope link metric 1000
I don't know how to interpret it...
Re: Access server from outside
Quote:
Originally Posted by
Tine1990
The second code gives me:
10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15 metric 1
169.254.0.0/16 dev eth0 scope link metric 1000
No default route? Then you probably don't have Internet access at all on that machine. You said it was a VM. How did you configure networking for it? I'm not familiar with VirtualBox settings but on VMWare I usually choose "Bridged: Connected directly to the physical network".
Re: Access server from outside
... it's similar in VirtualBox, you can go to the 'Devices' menu, then select 'Network Adapters...' and changed from 'NAT' to 'Bridged Adapter' using the 'Attached to: ' dropdown
The VM will then get an IP in the same range as the host and can be connected to from other hosts in the LAN. To go outside the LAN, you would then need to do the port forwarding + static (or dynamically reconfigured) external IP