mercredi 12 septembre 2018

Port Forwarding to Glassfish Web Services Application on Ubuntu Not Working

I have been working on this for a couple of days now, and it is probably something very simple that I am overlooking, but I can't seem to get this to work.

So, any help would be greatly appreciated!

Here are some details:

1) I have developed a REST Web services application which is deployed using Glassfish 5.0 on my Ubuntu PC.

The domain's server-config "Network Listener" "http-listener" address is set to 0.0.0.0 and the port number to the desired [port-number]

2) I configured the ISP Router Port Forwarding feature using a static [lan-ip-address], e.g. 192.xxx.o.xxx, setting the Start-Port and End-Port to the desired [port-number], and the protocol to TCP

3) Using https://www.yougetsignal.com/what-is-my-ip-address/ I get the [wan-ip-address] which is exactly the same as the [wan-ip-address] on the ISP Router Status page.

4) Using https://www.yougetsignal.com/tools/open-ports/ Entering the [wan-ip-address] and [port-number] I get

"Port [port-number] is open on [wan-ip-address]."

Which is correct.

5) Executing the following on my Ubuntu 16.04 LTS PC:

nmcli dev show | grep DNS

Shows the ISP Router DNS Server and Alternate DNS Server IPs

E.g. IP4.DNS[1]: [router-dns-server-ip-address]

6) On the Ubuntu PC:

/etc/hosts has:

    127.0.0.1       localhost
    [lan-ip-address]   MyUbuntu

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

/etc/hostname has:

MyUbuntu

/etc/network/interfaces has:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo 
iface lo inet loopback

auto eth0
iface eth0 inet static
address [lan-ip-address]
netmask 255.255.255.0
gateway [router-gateway-ip]
dns-nameservers [router-gateway-ip]

/etc/resolve.conf has the ISP Router name servers IPs listed

and /etc/NetworkManager/NetworkManager.conf has

[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq

[ifupdown]
managed=true

7) Executing "wget [lan-ip-address]:[port-number]" works and returns:

--2018-09-12 16:05:38--  http://192.168.0.107:10080/
Connecting to 192.168.0.107:10080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6430 (6.3K) [text/html]
Saving to: ‘index.html’

index.html 100% 6.28K  --.-KB/s    in 0s 

8) Using Postman or a Browser to send a GET request as follows (On my local network):

http://[lan-ip-address]:[port-number]/myapp/myresource

I get my JSON back.

But the following does not work using the WAN IP:

http://[wan-ip-address]:[port-number]/myapp/myresource

Any help would be greatly appreciated!

Thanks!!




Aucun commentaire:

Enregistrer un commentaire