I am working on an iphone app in which i want to access database from server through a VPN
Edit as i search. connection To server through is VPN is difficult and i was not found any solid information about this SO now i divide my Question in to two parts and part 1 is important to do as compare to other
Question 1
i have a SQL server DATABASE and a live ip of this server and i want to establish connection and access database through iphone . mean i iphone app store, select data or perform any DDL or DML methods from it self?
e.g
when user givs its info iPhone apps saves it on SQL SERVER DATABASE
Question 2
how can i do this all or which mean of communication is best through VPN how can i do and how can i hit or live IP?
You need a setup with a VPN-Gateway, which your iPhone is connecting to and some infrastructure behind the VPN-Gateway: at minimum the server the database is running on. The VPN connection can be setup in the iPhone Settings (you need the IP of your VPN-Gateway, Account, Password...), this has to be done manually and can't be controlled by the App. Once the VPN is setup and activated you can access the database as you would do it with any other App.
Edit: Question 2: I'm not sure if VPN is the right choice here. Is your server publicly available or is it inside an intranet? If it's publicly available a SSL/TLS connection would be the better choice instead of a VPN.
Related
I am trying to connect 3 beckhoff plc's to my MySQL database on gcloud.
1 plc is on our home network, the 2 other is on 2 different mobile sites, and are connected via mobile network(4g/3g)
The 1 plc connects with out any difficulty.
The 2 plc's that is connected via a mobile networks will not connect. They return with a timeout error.
I suspect that is because of how mobile networks work, that makes it, that i can not just add them to my "Authorized networks".
Is it just me and are the a way to connect to my MySQL server on gcloud?
Background:
I started a google cloud account yesterday to try it out. So this might just be a problem of me not understanding the service.
You can use the Google Cloud SQL proxy, which uses service account credentials to authenticate connections to your database.
You could also manually configure an SSL certificate and use that instead.
My question, to be more clear, it is to create a server with mongodb on a cloud hosting (for example) and access it through another server.
Example:
I have a mobile app.
I hosted my mongoDB a cloud hosting (ubuntu).
I want to connect my app to the db on the server cloud.
Is it possible? How?
I'm joining this learning and my question was exactly MongoDB to create a server in a way that I could access it remotely.
Out of "localhost"? Different from all the tutorials I've seen.
From what you are describing, I think you want to implement a 2-Tier-Architecture. For practically all use cases, don't do it!
It's definitely possible, yes. You can open up the MongoDB port in your firewall. Let's say your computer has a fixed IP or a fixed name like mymongo.example.com. You can then connect to mongodb://mymongo.example.com:27017 (if you use the default port). But beware:
Security You need to make sure that clients can only perform those operations that you want to allow, e.g. using MongoDB integrated authentication, otherwise some random script kiddie will steal you database, delete it, or fill it with random data. Many servers, even if they don't host a well-known service, get attacked thousands of times per day. Also, you probably want to encrypt the connection so people can't spy on the connection. And to make it all worse, you will have to store the database credentials in your client app, which is practically impossible to do in a truly secure way.
Software architecture There is a ton of arguments against this architecture, but 1) alone should be enough. You never want to couple your client to the database, be it because of data migrations, software updates, security considerations, etc.
3-Tier
So what to do instead? Use a 3-Tier-Architecture: Host a server of some kind on mymongo.example.com that then connects to the database. That server could be implemented in nginx/node.js, iis/asp.net, apache/php, or whatever. It could even be a plain old C application (like many game servers).
The mongodb can still reside on yet a different machine, but when you use a server, the database credentials are only known to the server, not to all the clients.
Yes, it is possible. You would connect to MongoDB using the ip address of your host, or preferably using it's fully qualified hostname rather than "localhost". If you do that, you should secure your MongoDB installation otherwise anyone would be able to connect to your MongoDB instance. At an absolute minimum, enable MongoDB authentication. You should read up on MongoDB Security.
For a mobile application, you would probably have some sort of application server in front of MongoDB, e.g. your mobile application would not be connecting to MongoDB directly. In that case only your application server would be connecting to MongoDB, and you would secure MongoDB accordingly.
I am exploring the possibility of communicating with server that requires VPN connection outside of corporate network using iOS enabled device. I found out that I can connect to VPN using proprietary apps of Cisco, F5, Juniper etc. Assuming that user has successfully connected to VPN using these apps, can I directly communicate(call web service) from my iOS app? I know that Safari can directly communicate with server requiring VPN connection once user establish connection using one of apps I mentioned.
Thanks,
Jignesh
I'm sure that there could be unique circumstances that cause problems, but in my experience I have found that this works just fine. I have an app that interacts with SOAP services running on servers within our corporate intranet. Once I have established a VPN connection using network-specific clients (I've used both Cisco and Juniper clients) I am able to use NSURLConnection and other iOS API's to connect to those servers.
Hi i am developing iPad client server based application. It is required in application that when application starts it searches for specific server. If server found then connect with it and start consuming webservices on that server.
The point is user should not enter IP address of server. Application search servers and connect with specific server. Is there anyway to find server.
Apple has a technology called Bonjour which is designed for this kind of thing.
http://www.apple.com/support/bonjour/
http://my.safaribooksonline.com/book/programming/iphone/9780470918029/bonjour-programming/browsing_for_services
If you want a simpler solution, you could just use a DNS entry with a CNAME or A record pointing to the server.
Recently we got a new server at the office purely for testing purposes. It is set up so that we can access it from any computer.
However today our ip got blocked from one of our other sites saying that our ip has been suspected of having a virus that sends spam emails. we learned this from the cbl http://cbl.abuseat.org/
So of course we turned the server off to stop this. The problem is the server must be on to continue developing our application and to access the database that is installed on it. Our normal admin is on vacation and is unreachable, and the rest of us are idiots(me included) in this area.
We believe that the best solution is to remove it from connecting to the internet but still access it on the lan. If that is a valid solution how would this be done or is there a better way? say blocking specified ports or whatever.
I assume that this server is behind a router? You should be able to block WAN connections to the server on the router and still leave it open to accepting LAN connection. Or you could restrict the IPs that can connect to the server to the development machines on the network.