What is the difference between NEVPNManager and NETunnelProvider? - ios

I'm trying to find out what's the difference between the two. I get the NETunnel is for ssl-vpn's and custom vpn's, but can they still be used interchangeably?
Can I use NETunnel to connect to an IPSec VPN?
My main need is to set my dns for the VPN, but I can't seem to do it with NEVPN

NEVPNManager is designed to control VPNs based on one of the built-in VPN plug-in types. NETunnelProviderManager is designed to control custom VPN plug-ins (and requires a special entitlement for those plug-ins).
Normally, with most VPNs, you would change the DNS on the other end of the VPN tunnel, by having the actual VPN server send a list of DNS server IPs to the client, this making that a server configuration detail, rather than something the app itself would need to control. NETunnelProviderManager offers that ability because it is designed to handle arbitrary VPN types that might not work that way.

Related

Possible to create more than one Ikev2 VPN using network extension in Mac OSX?

My requirement is to create multiple tunnels using network extensions.
No, it is not possible to create more than one out-of-the-box available (IKEv2 / IPsec) VPN protocol configurations in a single app.
If you want to create multiple VPN configurations, you will need to use NETunnelProviderManager with your custom VPN protocol (which you can implement as IKEv2, but it will require much more work than just using already available protocols in NEVPNManager).
Some information where to start could be found here.

Setting up proxy server on iPhone

I am trying to set up a proxy server on my iPhone. I am doing this manual by looking up a proxy server Ip and port from Google and use this as proxy settings on my iPhone.
But when I do this and I try to connect to a random url, it is taking too long and at the end it says: can't open this page because the network is disconnected.
I have tried like 30 different IPs and ports from multiple websites and got none of them worked.
What am I doing wrong?
You're setting up non-working proxy servers.
Almost all "best 100 free public proxy servers" lists are fake or outdated.
The only option to guarantee that proxy is working is to make your own proxy.
I used Amazon free tier instance with Linux and installed proxy on it. It is free for one year.

Which protocols can be used to automatically set up inbound port-forwarding?

Today many of the routers do not forward inbound traffic from internet to LAN devices by default.
What are the best standards to use for my application to set up a dynamic inbound port-forwarding automatically for my services (UDP and/or TCP)?
I'm looking for solution like UPnP or whatever. It'd also need to be backwards compatible with old routers/modem.
P.S. How do software like utorrend implement this?
You need portforwarding. You need to know the ip adres of your server. For windows i use ipconfig, but you did not mention your OS.
Then you need to access your router (via your browser, type in the ipadres of your router itself). There you can login into your router and access the menu of the router. Search for portforwarding and set redirect the port you want to your server. I suppose you use your server as a bittorrent client:)
Some solutions I found:
Internet Gateway Device Standardized Device Control Protocol (IGD), by uPnp.
Application-level gateway (ALG).
STUN (thanks Sigismondo).
NAT Port Mapping Protocol (PMP) for MAC devices.
Others ? Pro and cons ? compatibility ?

Accessing a website on private network

I developed a NodeJS web application meant to be accessed on a private wifi network.
My goal is to have users connect to my server hosted on Ubuntu 14.04LTS, on which I setted up a Wifi hotspot.
The users connect to the wifi network with mobile devices, and then go with their browser to
http://my.server.local.ip/
What is the easiest way to set up a DNS (or something else) so that they are able to browse to a human readable URL instead of my IP ?
Sorry if the question has been answered before, I am a beginner in network configuration and I may not search the good keywords.
Thanks for reading
EDIT:
I forgot to mention that my network provides no access to Internet. I already own a domain for this app, but for the online-version of it. My goal is to build a portable server machine which can serve the application to mobiles on bad Internet coverage areas.
This depends on which machine acts as the DNS-server for your network. Does your Server/WiFi-AP just redirect/bridge the traffic to an ethernet-port and the DHCP-requests from the mobile devices are answered by another device (router-box?) in your network? In that case, that box will also be the DNS-server the mobile devices will be querying for hostname resolution. Maybe you can configure a static IP and hostname for your Ubuntu-server in the router's web interface.
Otherwise, you can set up a DHCP and/or DNS-server on the Ubuntu-machine. A lightweight tool for this job is DNSmasq (http://www.thekelleys.org.uk/dnsmasq/doc.html). This seems to be what you want, reading your latest comment. Configure a static IP address for the server-machine's WiFi-Interface and configure your DNS-server running on the Ubuntu-machine to map the hostname/domain of your choice to that IP. Then the mobile devices can access the website delivered by the Ubuntu machine by using that domain name.

How to tell ruby net libraries to use a particular network interface?

I'm doing some page scraping for a client and need to connect to their
vpn server. So I have the vpn client running on my linux box, and this
creates a new interface, say ppp0. Now, when I run Mechanize/open-uri,
etc. I need to be able to bind specifically to this particular
interface, because the other interfaces are to the internet in general.
How do I do this?
Thanks
If what you are connecting to over the VPN isn't also available over the open internet you shouldn't have to do anything and the internal TCP/IP networking stack should sort out the correct interface automatically.

Resources