How to connect to a database running on VM? - database

I got a question here. Seems a little complicated in my mind. Hope I can make myself clear. :)
I have a Win7 system (system A) with a Win7 VM (system B) running on it.
System B is connected to a intranet through VPN to log some realtime data into a local sql server database. Internet connection is disabled by administrator so System B is separated from outside.
Now System A wants to connect to this database and read these realtime data.
Is it possible?

I don't have any experience with vmware, but assuming you can use any VM, here's a solution for VirtualBox:
Setup a network interface on your VM, that's visible to the host
system only (reference):
Host-only networking is another networking mode that was added with
version 2.2 of VirtualBox. It can be thought of as a hybrid between
the bridged and internal networking modes: as with bridged networking,
the virtual machines can talk to each other and the host as if they
were connected through a physical ethernet switch. Similarly, as with
internal networking however, a physical networking interface need not
be present, and the virtual machines cannot talk to the world outside
the host since they are not connected to a physical networking
interface.
Configure port forwarding on system B ([external_port] -> [host_over_vpn]:[service_port])
Connect to [system_B_ip_over_provided_interface]:[external_port] as if you were connecting to the database directly.

yes it is possible. Just give correct IPs.

Related

How to connect to a sql database from a device connected to a different network

I am developing an app with a login system in flutter. Using postgresql I can access to an external database located in a raspberry. All works perfect until the network of the device changes. So here are my questions:
How can I access to a database from a device connected to a different network? Is that possible?
If not, how could it be the correct way to do it? or what should I read and/or learn to apply this funcionality?
Thank you.
This question is not Postgres specific.
You connect to servers over TCP/IP protocol using servers IP address or it's FQDN, fully qualified domain name. If your device is mobile and changes network, you can use some dynamic IP service or your own name servers.
Setting up a port forwarding system is also possible.

How to connect a volttron platform to one on a remote server

I would like to connect a volttron platform running on a raspberry pi connected to the local network of a building to a second volttron platform running on a virtual personal server.
I know that two volttron platforms can interact with each other using the Volttron Central Management Agent or using the ForwardAgent. However, it is not clear to me what security method is used. Our ICT manager only agrees to set up a connection if the information is exchanged through https.
Could you help me formulating an answer to ICT regarding the security issue? And give me some pratical tips on how to set up the volttron configuration files? I'm not very familiar with network/security technologies. Maybe important to know: the server has a proxy and a reverse-proxy security.
Thx!
Your security person is correct. You should only set the platform up in a "real" environment through https. Since you have a proxy, that should be forwarded to the volttron central agent.
internet (443) -> proxy -> http://127.0.0.1:8080
The proxy in this case is on the same machine as the volttron central platform.
This is how we are doing it with apache as our proxy. One could do the same thing with a different web server such as nginx.
Hopefully that helps
If you are indeed trying to connect from a single instance to another instance (e.g. the way the forwarder does). Then the answer is the security is using public/private key pairs with curve mq providing perfect forward security. All traffic between platforms is 100% encrypted and only authorized agents can transmit across the instances bus.
http://curvezmq.org/

share sql database across virtual machines on remote desktop

I am looking to use a SQL database on one VM as the enterprise repository for an application on another VM. Basically, I need to connect the SQL database to the initial virtual machine on the new virtual machine.
Well you can't do this through remote desktop, the protocols are entirely different. However, as far as networking two virtual machines together goes that would really depend on the vendor of your virtualization software.
VMWare workstation allows you to create local private networks, while the free versions of VMWare and Virtualbox both support bridged network functionality where they obtain their own IP address from your local network. The standard passthrough networking functionality will not work correctly since your app server will not know how to reference the database instance.

how to access database on laptop using api on mobile

I have developed an application using sql anywhere database as back end and powerbuilder as front end. it is working on my laptop very well and i have also used this app on network server (without internet ) using wifi on another laptop. in which the program is installed on that other laptop and it connects database stored on my laptop .
now i want to develop a mobile app which should connect to my laptop and use database stored on it. It should connect the database using WIFI network.
i have knowledge of powerbuild simple programing, SQL and Visual basic. but i dont know any thing about mobile app developing.
Please help me to solve my problem.
This shouldn't be too challenging, it sounds like you want the app to connect to a network (or your laptop) database vs. the client machine like any web application and this shouldn't be a challenge other than making sure you've opened up the proper ports for the database in windows firewall AND/OR if you are on the INTERNET you'll probably need to set up port forwarding on your local router so that the database requests to your laptop from the "internet" get forwarded from your router to your local subnet (network).
So for example mySQL uses port 3306 (I think.. memory?) so you'd need a port forward in your router that forwards incoming 3306 requests to your laptop IP address, mac address, or machine name (better to use machine or mac).
HTH

Silverlight and TCP

Is it possible for Siverlight to communicate directly with an open TCP port on the user's machine?
in a word No.
You can use sockets (and therefore TCP) to communicate with open ports (in a limited range) on the server that is hosting the application, but you cannot connect to any other machines. if you need to interoperate with something on the client machine i would suggest using the new COM interoperability in Silverlight 4 (here is an example)
You can connect to an open TCP port on any machine that serves a security policy file or to any machine, including the local client, if Silverlight runs with elevated privileges.
Elevated privileges are not likely to be problematic as in scenarios like this you are probably developing a line of business application.
At my company I implemented the binary TCP protocol of an RFID server in Silverlight. The server must be connected to the local network and its dns name (or ip address) be known, other than that there is no problem in doing this sort of thing. It is around since Silverlight 3.

Resources