Jump to content

Serving Elixir/Phoenix apps through QNAP

Good Morning Everyone,

 

I've got a predicament i'm hoping someone more experienced can help out with. I have two setups to test our web dev stuff at home with: 

1) Straight ubuntu server connected via lan/wifi; and

2) QNAP NAS with ubuntu installed connected via lan/wifi.

 

Both Setups use same router with relevant ports forwarded to local machines, and no firewall blocking. When I create a elixir/phoenix app and run it on setup #1, i can see it locally on all machines, however, when i run it on setup #2 I cannot access the pages at all ("localhost:4000/"), but on the actual ubuntu desktop you can. If it helps wittle it down a bit further, i'm also unable to SSH in to the QNAP/ubuntu setup when connected either externally or internally, request always timesout. 

 

anyone have experience serving web apps locally with qnap?

 

Thanks in advance

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, rewird said:

Good Morning Everyone,

 

I've got a predicament i'm hoping someone more experienced can help out with. I have two setups to test our web dev stuff at home with: 

1) Straight ubuntu server connected via lan/wifi; and

2) QNAP NAS with ubuntu installed connected via lan/wifi.

 

Both Setups use same router with relevant ports forwarded to local machines, and no firewall blocking. When I create a elixir/phoenix app and run it on setup #1, i can see it locally on all machines, however, when i run it on setup #2 I cannot access the pages at all ("localhost:4000/"), but on the actual ubuntu desktop you can. If it helps wittle it down a bit further, i'm also unable to SSH in to the QNAP/ubuntu setup when connected either externally or internally, request always timesout. 

 

anyone have experience serving web apps locally with qnap?

 

Thanks in advance

Does the Ubuntu OS on the QNAP have its own IP address seperate from that of the QNAP NAS OS? If so then you have to forward to the IP, not the NAS'. Otherwise, the QNAP might be running the virtual NIC in NAT mode, meaning that the QNAP is basically acting as a router, and you would have to forward the ports on the QNAP as well.

Looking to buy GTX690, other multi-GPU cards, or single-slot graphics cards: 

 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, brwainer said:

Does the Ubuntu OS on the QNAP have its own IP address seperate from that of the QNAP NAS OS? If so then you have to forward to the IP, not the NAS'. Otherwise, the QNAP might be running the virtual NIC in NAT mode, meaning that the QNAP is basically acting as a router, and you would have to forward the ports on the QNAP as well.

oh snap! thats probably it, yeah the ubuntu os has the 10.3.0.4 type ip, so port forward to the ubuntu ip not the nas one?

Link to comment
Share on other sites

Link to post
Share on other sites

35 minutes ago, rewird said:

oh snap! thats probably it, yeah the ubuntu os has the 10.3.0.4 type ip, so port forward to the ubuntu ip not the nas one?

well first - is that IP one that is within your router's subnet? Can you directly reach that IP, but ping or SSH, from other devices on the network?

Looking to buy GTX690, other multi-GPU cards, or single-slot graphics cards: 

 

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, brwainer said:

well first - is that IP one that is within your router's subnet? Can you directly reach that IP, but ping or SSH, from other devices on the network?

Ill have to double check, just away with work atm, but back tomorrow so will update then thanks so far =)

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, rewird said:

Ill have to double check, just away with work atm, but back tomorrow so will update then thanks so far =)

Ok. If that IP isn't within the router's subnet (if the VM couldn't have gotten that IP from the router via DHCP) then it must have gotten it from the QNAP, which would appear to be running NAT. If that's the case, I would first try to change how the QNAP does networking for VMs to Bridge mode, or sometimes called External. I have never seen QNAP's setup, but since they likely base their OS on some form of linux or BSD, they should have similar networking setup to most other hypervisors.

Looking to buy GTX690, other multi-GPU cards, or single-slot graphics cards: 

 

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, brwainer said:

Ok. If that IP isn't within the router's subnet (if the VM couldn't have gotten that IP from the router via DHCP) then it must have gotten it from the QNAP, which would appear to be running NAT. If that's the case, I would first try to change how the QNAP does networking for VMs to Bridge mode, or sometimes called External. I have never seen QNAP's setup, but since they likely base their OS on some form of linux or BSD, they should have similar networking setup to most other hypervisors.

Well due to restrictions on the client's end we've had to simulate it with static ip's:

 

(Examples)

Machine 1: Static 10.140.39.10 ------

Machine 2: Static 10.140.39.15 ------  255.255.255.0

QNAP: Static 10.140.39.2  ------------

QNAP => Ubuntu 10.0.0.3

 

 

I'll test tomorrow 

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, rewird said:

Well due to restrictions on the client's end we've had to simulate it with static ip's:

 

(Examples)

Machine 1: Static 10.140.39.10 ------

Machine 2: Static 10.140.39.15 ------  255.255.255.0

QNAP: Static 10.140.39.2  ------------

QNAP => Ubuntu 10.0.0.3

 

 

I'll test tomorrow 

Unless the subnet mask everywhere is 255.0.0.0, that really looks like the QNAP is doing NAT. And actually it might be doing NAT even if the subnet masks were 255.0.0.0 (equal to /8)

Looking to buy GTX690, other multi-GPU cards, or single-slot graphics cards: 

 

Link to comment
Share on other sites

Link to post
Share on other sites

So, removed router and only using a switch to connect to limit the issue;

 

I can ping Client machine #1 and #2 from the QNAP/ubuntu, and I can ping the QNAP/Ubuntu from the client machines.

Config with Ubuntu: 

10.0.3.2 with default gateway of 10.0.3.1

Checked config on the QNAP control panel; 

Virtual Adapter 2: 10.0.3.1 in NAT mode

Adapter 1 (Primary): 10.145.39.2 (Switch mode)

Link to comment
Share on other sites

Link to post
Share on other sites

Alright, got the phoenix/elixir working on client pc's =) Will reconnect router soon and try then with ssh also.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×