Creating L2TP VPN on Mac OS X Programatically - objective-c

I am trying to make application which can be use to connect to VPN using L2TP Protocol for Mac OSX Application using Objective C.
I search a lot regarding this but couldn't find any proper example or tutorial.
I Found halo/macosvpn for mac os vpn connection but it is command line tool i would like to make it in my application.
For E.g If i pass Server id, Shared Secret Key, username, password then my mac should be automatically connect to that VPN Server.
Any help will be appreciated...

No, you need use SCNetwork and Helper Tool (to get root access) With this link you will be able to create L2TP Protocol and connect with it.
This works even on the latest version MacOS 11 "Big Sure"
The helper tool is needed to get root access so you can make changes to the system keychain. You will put the password and shared secret there, because the configuration will not be able to perceive them from other places. Having created a vpn configuration with the help of SCNetwork, the mac will not be able to automatically connect.
To connect to the created profile, you need to programmatically execute the terminal command
networksetup -connectpppoeservice "name VPN profile"

Related

Able to ping the system using IP but not able to access api

My API is running on the Windows system. I'm calling API from another MAC system, but it's just getting a timeout.
I'm able to ping from Mac to Windows and vice versa, but API not working which is running a specific port.
Also, if I'll connect mobile Hotspots then I'm able to call API. But using WIFI router not able to connect.
Please let me know if you have any suggestions
I'm using Windows 11. After I disabled windows defender, I'm able to access API from other systems

Can we use BLPAPI remotely?

The SDKs at https://www.bloomberg.com/professional/support/api-library/ allow you to connect to localhost 8194 to fetch data. Please correct if any of the following is incorrect:
The use of the SDK requires the installation of a Terminal software on the PC where the program using the SDK is being run.
The Terminal software creates an endpoint listening on port 8194 through which the data can be fetched.
Question:
Is it possible for another computer in the local network to run the SDK and connect to the computer that hosts the Terminal service?
Does the Terminal service license support such use wherein the data leaves the PC and gets pulled to a different PC?
Regards
No, it is not technically possible to connect to another PC which is running the Terminal and even if you can get around this it is not allowed by the license. Data downloaded on a PC running the Terminal must stay on that PC.
Bloomberg offers 2 solutions which don't require the Terminal to run and do require authentication: Server API (SAPI) and B-PIPE. To clarify, because you're describing having to run the Terminal on the PC you're necessarily talking about Desktop API.

Marklogic WebDav server connection not working after macOS Mojave upgrade

All Mac computers at my job were upgraded to macOS Mojave four days ago. Since then, no Mac users have been able to connect to any MarkLogic WebDav servers. PC users are able to connect no problem and so are Macs that are still running older versions of macOS.
Also, now when trying to connect to the WebDav server through Finder, we get this pop-up message:
"Do you want to send your name and password in a way that is insecure?
The baseURL provided uses an unsecured method for network communication. To use a secure connection, you must use a server that supports SSL."
Has anyone else encountered this issue? Is there a setting in MarkLogic that we need to change?
Thank you!
It sounds like the primary change is that macOS now issues a warning when you are connecting in a way that could send your password in clear text.
MarkLogic supports WebDAV over SSL, so to remove the warning, you will need to enable SSL on your WebDAV app server.
The MarkLogic Security Guide goes into the details of Configuring SSL on App Servers.
You can also check the WebDAV Server Configuration Help for a complete list of the available options for a WebDAV app server.
It was an Apple issue. We installed the Mojave 10.14.6 supplemental update and the problem fixed itself. We're able to connect to the WebDav servers no problem. Thanks!

Gcloud compute SSH connects to a different Instance than SSH + certificate

So I'm trying to connect to a gcloud instance where I've installed several packages and started to develop my code with no problem. During the week, I use a certificate and putty to login since I work with a windows machine.
However now that I'm home, I tried to connect to the instance using my mac where I installed the Google Cloud SDK and after configuring all the parameters using
gcloud init
I get logged to an empty instance that doesn't have all of the packages and scripts I mentioned above.
What am I doing wrong? I can confirm that I'm connecting to an instance with the same name, in the same region and all, but it is completely different.
Cheers!
As you are connecting from a different machine, that's a different user.
Go to /home, and check if there is a folder with the "other" username. Note that you might not be able to access. You would need to become superuser.

how to programmatically enable remote management under sharing in Mac OS X 10.8

I am working on a project which requires VNC Server to be run on my system (Mac OS X v10.8).
VNS server is installed in my Mac system, now I need to run VNC server, but for running the server sufficient privileges needs to be provided programmatically or using Apple Script(System Preference -> Sharing -> Remote Management -> Enable the check box).
How could I enable remote management through objective c program or apple script ?
or is there any API provided by Apple to manage sharing options?
You can enable and configure the remote management service with the kickstart command. It's not in the usual PATH, so you need to specify its full path:
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart
Its option format is a little cryptic, but with some experimentation you should be able to get the effect you want (see Apple's KB #HT2370 and SS64.com's "man page").
Also, it must run as root, so from AppleScript, use do shell script with administrator privileges. I think you'll need something close to this:
do shell script "/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -restart -agent -privs -all" with administrator privileges