Rails application can't reach remote PostgreSQL server (proxy, VirtualBox) - ruby-on-rails

I have a Windows 7 PC with Forefront TMG proxy. There is a VirtualBox virtual machine installed with Ubuntu 16.04 (64-bit) guest OS. I'm not a seasoned Unix-user, so I tried to configure Ubuntu's network through GUI window.
After several tries I wound up with these settings:
https://i.stack.imgur.com/in4yR.jpg
All works fine now. I can use browser and git and do various network stuff. But!
I have a Rails application, which uses a remote PostgreSQL database. When I start my Rails server, it throws this exception:
Puma caught this error: could not connect to server: Network is unreachable
Is the server running on host "this_is_the_host_url" and accepting
TCP/IP connections on port 5432?
(PG:ConnectionBad)
This applications works fine on the other PC with similar Windows 7 and VB Ubuntu, but without a proxy. Also I tried to reach the remote DB-server from my host Win7 with PGAdmin - all works fine, even with proxy. The issue is somewhere between my Ubuntu guest OS and my Windows host OS.
Should I configure proxy settings in Ubuntu in a different way?
Any other way to resolve this issue?
Traceroute shows this:
1 10.0.2.2 (10.0.2.2) 0.638 ms 0.577 ms 0.549 ms
2 10.0.2.2 (10.0.2.2) 29.369 ms !N 53.000 ms !N 75.644 !N
As I can get it, 10.0.2.2 is my host OS ip.
I searched through the web, but all I could get belongs to the opposite side: to reach to the proxied VB Ubuntu, not from it.

Related

Plastic Client unable to see Plastic Server

Morning,
I am in the process of moving our plastic server to a new machine. All going well so far, users, configs good, databases still transferring (will take a while).
However, I've tripped at a basic hurdle. Clients on our network are unable to see the server and it appears to be linked to good ol' windows firewall - as on disabling windows firewall on the server the client is then able to see the server.
Info:
Server OS: Windows Server 2019 Standard v. 1809
Client OS: Windows 10 Pro, Windows 11 Pro
Port used: 8087
Old server has been disconnected from the network
Troubleshooting so far
Using Telnet in command line on client computer confirms the port is open on the server's IP
Firewall rule created opening TCP 8087 over Domain, Private, Public - inbound and outbound
Tried reverting to the default port 8084
Any help much appreciated

Why my WAMPSERVER can't work?

I have some problem with my WAMP server and I downloaded from the official website. I wanted to use only for the local server (for Chrome), without WordPress, only for HTML/CSS/JS files. The servers (Apache, PHP and MySql) and the localhost webpage has оpen, but when I try to open my projects it's giving me the error:
This webpage is not available ERR_NAME_NOT_RESOLVED: and in details:
The server at problem%201 can't be found, because the DNS lookup
failed. DNS is the network service that translates a website's name to
its Internet address. This error is most often caused by having no
connection to the Internet or a misconfigured network. It can also be
caused by an unresponsive DNS server or a firewall preventing Google
Chrome from accessing the network.
P.S. OS: Windows 8.1 Pro N

parallels 9 - mac 10.9 - windows 8.1 rails server running on mac, how to localhost:3000 from internet explorer?

Parallels 9 with windows 8.1 (and more), Mac 10.9.5
rails 4.2 ruby 2.0.0, development app running on localhost:3000
I want to access app from internet explorer running on windows 8.1 in parallels.
I have read every post on the net and submitted a ticket to parallels: no luck.
bridged network (default adapter), tried windows firewall inbound rules, opening port 3000 (parallels recommendation, no luck)
ifconfig on mac 192.168.0.1, ipconfig on windows depending on network
anybody able to tell me how to do this? Thanks!
Disable windows firewall (no body know how to configure it :)
Run rails application with binding to 0.0.0.0 (rails s -b 0.0.0.0)
Are you sure exactly that your IP is .1? Check it in Preferences/Network in IP Address label.
Check that windows ping your host (ping 192.168.0.1).
Try to open 192.168.0.1:3000 in IE.

Is there a way I can access my Rails Application of my Ubuntu VM from my Windows 7?

I got a Rails application (running on Thin server) running on my Ubuntu VM, how can I be able to access it from my Windows 7 OS? I already have the VM bridge option enable.
I tried using the IP address from my Ubuntu VM directly to my windows 7 browser, but nothing happens, is there a way to do that?
Yes, you can:
You need a Bridged adapter for your Virtual Machine
You need to know your VM's IP address (ifconfig | grep inet on Ubuntu)
Your VM needs to be turned on AND running the server
Then in your Windows 7 (or other computer in your local network, your smartphone for instance) you can open a browser and go to your VM's IP address + port (usually 3000).
So, the address to put in your browser might look like this:
http://192.168.1.5:3000/

Accessing rails sever on a virtual machine from host machine

I've got Ubuntu (the newest version) running as a virtual machine on Windows 7 Pro, using VMware.
My question is, can I make the rails sever acessible to windows while the virtual machine is running?
So, for example, if I type on my Windows browser http://localhost:3000 I would get the rails sever?
Also, can I make it acessible to computers from the outside, so if someone would type
myipaddress:3000 he would be able to acess the sever as a client?
I hope this is clear.
There are a lot of "ifs" here, but it should "just work".
In Linux, find the IP address of your virtual machine.
$ /sbin/ifconfig
You're looking for a section that is probably labelled "eth0" and in that "inet addr".
Using that address with port 3000 from your Windows host should work fine. If not, post the specific problem that you're seeing, including any logs you can find or info on any firewalls you have running on your Linux client.

Resources