Page 1 of 1

Cannot connect from Android phone

Posted: Sat Sep 29, 2018 5:27 pm
by iamnaok
Hi there,

I had installed and configured Softether VPN server on a remote Windows 10 machine. I configured my Samsung S9+ Android phone as per user manual. When I try to connect to VPN from my phone, I get "Unsuccessful" error message. I googled a lot, but could not find a solution.

Some posts suggest that I need to forward 500 and 4500 ports to my VNP server IP address. How can I do that?

Regards,

Naok

Re: Cannot connect from Android phone

Posted: Sat Sep 29, 2018 5:29 pm
by fenice
Does your Windows machine have the firewall enabled and/or are you behind a NAT router?

Re: Cannot connect from Android phone

Posted: Sat Sep 29, 2018 7:26 pm
by cmd wh0ami
or Use OpenVPN on your Andoid instead of L2TP/IPsec... Then open up the openvpn client config with a txt editor and make changes like this example below...
Change the proto to TCP

55.55.55.55=your public IP address... But change the port from 1194 to 443

###############################################################################
# Specify the underlying protocol beyond the Internet.
# Note that this setting must be correspond with the listening setting on
# the VPN Server.
#
# Specify either 'proto tcp' or 'proto udp'.

proto tcp


###############################################################################
# The destination hostname / IP address, and port number of
# the target VPN Server.
#
# You have to specify as 'remote <HOSTNAME> <PORT>'. You can also
# specify the IP address instead of the hostname.
#
# Note that the auto-generated below hostname are a "auto-detected
# IP address" of the VPN Server. You have to confirm the correctness
# beforehand.
#
# When you want to connect to the VPN Server by using TCP protocol,
# the port number of the destination TCP port should be same as one of
# the available TCP listeners on the VPN Server.
#
# When you use UDP protocol, the port number must same as the configuration
# setting of "OpenVPN Server Compatible Function" on the VPN Server.

remote 55.55.55.55 443

Re: Cannot connect from Android phone

Posted: Sat Sep 29, 2018 8:53 pm
by cmd wh0ami
To open ports on your router you put the routers local IP address in the browser (ie. 192.168.0.1) the after username and passwd look for firewall settings.. there should be settings for virtual server or something simular... then you input the hosts local ip the vpn server is running on and the ports you want to open... for L2TP/IPsec its tcp 500 and tcp 4500 like you were saying...

I personally wouldnt use L2TP/IPsec and I'd go for OpenVPN since it'll give you a lot more options.

Re: Cannot connect from Android phone

Posted: Sun Sep 30, 2018 2:51 pm
by iamnaok
fenice wrote:
Sat Sep 29, 2018 5:29 pm
Does your Windows machine have the firewall enabled and/or are you behind a NAT router?
Firewall is switched off

Re: Cannot connect from Android phone

Posted: Sun Sep 30, 2018 2:52 pm
by iamnaok
cmd wh0ami wrote:
Sat Sep 29, 2018 8:53 pm
To open ports on your router you put the routers local IP address in the browser (ie. 192.168.0.1) the after username and passwd look for firewall settings.. there should be settings for virtual server or something simular... then you input the hosts local ip the vpn server is running on and the ports you want to open... for L2TP/IPsec its tcp 500 and tcp 4500 like you were saying...

I personally wouldnt use L2TP/IPsec and I'd go for OpenVPN since it'll give you a lot more options.
Which router? There is no router at remote Windows machine

Re: Cannot connect from Android phone

Posted: Sun Sep 30, 2018 3:07 pm
by iamnaok
cmd wh0ami wrote:
Sat Sep 29, 2018 7:26 pm
or Use OpenVPN on your Andoid instead of L2TP/IPsec... Then open up the openvpn client config with a txt editor and make changes like this example below...
Change the proto to TCP

55.55.55.55=your public IP address... But change the port from 1194 to 443

###############################################################################
# Specify the underlying protocol beyond the Internet.
# Note that this setting must be correspond with the listening setting on
# the VPN Server.
#
# Specify either 'proto tcp' or 'proto udp'.

proto tcp


###############################################################################
# The destination hostname / IP address, and port number of
# the target VPN Server.
#
# You have to specify as 'remote <HOSTNAME> <PORT>'. You can also
# specify the IP address instead of the hostname.
#
# Note that the auto-generated below hostname are a "auto-detected
# IP address" of the VPN Server. You have to confirm the correctness
# beforehand.
#
# When you want to connect to the VPN Server by using TCP protocol,
# the port number of the destination TCP port should be same as one of
# the available TCP listeners on the VPN Server.
#
# When you use UDP protocol, the port number must same as the configuration
# setting of "OpenVPN Server Compatible Function" on the VPN Server.

remote 55.55.55.55 443
I'm supposed to have a *.ovpn file to do that? Where do I get it?

Re: Cannot connect from Android phone

Posted: Sun Sep 30, 2018 3:18 pm
by iamnaok
cmd wh0ami wrote:
Sat Sep 29, 2018 7:26 pm
or Use OpenVPN on your Andoid instead of L2TP/IPsec... Then open up the openvpn client config with a txt editor and make changes like this example below...
Change the proto to TCP

55.55.55.55=your public IP address... But change the port from 1194 to 443

###############################################################################
# Specify the underlying protocol beyond the Internet.
# Note that this setting must be correspond with the listening setting on
# the VPN Server.
#
# Specify either 'proto tcp' or 'proto udp'.

proto tcp


###############################################################################
# The destination hostname / IP address, and port number of
# the target VPN Server.
#
# You have to specify as 'remote <HOSTNAME> <PORT>'. You can also
# specify the IP address instead of the hostname.
#
# Note that the auto-generated below hostname are a "auto-detected
# IP address" of the VPN Server. You have to confirm the correctness
# beforehand.
#
# When you want to connect to the VPN Server by using TCP protocol,
# the port number of the destination TCP port should be same as one of
# the available TCP listeners on the VPN Server.
#
# When you use UDP protocol, the port number must same as the configuration
# setting of "OpenVPN Server Compatible Function" on the VPN Server.

remote 55.55.55.55 443
I generated an .ovpn file from Softether, imported it into OpenVPN app on Android phone, tried to connect, the error message was " Waiting for the server to respond", then "Time out"

Re: Cannot connect from Android phone

Posted: Sun Sep 30, 2018 4:44 pm
by cmd wh0ami
Did you change the proto to tcp and change the port to 443 like I suggested in the .ovpn config? You open it with a txt editor in case you didn't already know...

Maybe enabling Secure NAT will help. I've never used a remote Windows Server, or even set up SoftEther server on Windows... I always run Linux... But if your firewall is off it's the only thing I can think of off the top of my head but it really doesn't make sense. Something somewhere is blocking the connection to the server.

SoftEther VPN Server Manager.... Connect to the server... Select Manage Virtual Hub... Select Virtual NAT and Virtual DHCP Server... Then Enable Secure NAT...

Did you follow a tutorial you found online? Give me the link if you did so I can see the steps you took. Maybe I can get a better idea of what the problem is.

Re: Cannot connect from Android phone

Posted: Mon Oct 01, 2018 3:17 pm
by iamnaok
cmd wh0ami wrote:
Sun Sep 30, 2018 4:44 pm
Did you change the proto to tcp and change the port to 443 like I suggested in the .ovpn config? You open it with a txt editor in case you didn't already know...

Maybe enabling Secure NAT will help. I've never used a remote Windows Server, or even set up SoftEther server on Windows... I always run Linux... But if your firewall is off it's the only thing I can think of off the top of my head but it really doesn't make sense. Something somewhere is blocking the connection to the server.

SoftEther VPN Server Manager.... Connect to the server... Select Manage Virtual Hub... Select Virtual NAT and Virtual DHCP Server... Then Enable Secure NAT...

Did you follow a tutorial you found online? Give me the link if you did so I can see the steps you took. Maybe I can get a better idea of what the problem is.
Yes, I changed proto to tcp and the port to 443. I used this tutorial: https://www.softether.org/4-docs/2-howt ... ient_Setup

When I made the changes to ovpn file and tried to connect via OpenVPN from my phone, it showed "OpenVPN: Waiting for server" message and then connection timeout. Additionally, I noticed in OpenVPN log that despite the changes I made to ovpn file, it tries connecting to the port 1194 over UDP

Re: Cannot connect from Android phone

Posted: Mon Oct 01, 2018 7:23 pm
by cmd wh0ami
I meant how you set the Server set up. (if you made a bridge to tap or eth0 or if you used secure NAT) Not the Client on Android. If the log still says it's trying to connect on upd 1194 the ovpn.config is wrong or your still using the original version before you made the changes.

This is the best free openvpn client I found for Android https://play.google.com/store/apps/deta ... n&hl=en_US . You can make all the changes to the config file from inside the app.

Re: Cannot connect from Android phone

Posted: Wed Oct 03, 2018 7:38 pm
by iamnaok
cmd wh0ami wrote:
Mon Oct 01, 2018 7:23 pm
I meant how you set the Server set up. (if you made a bridge to tap or eth0 or if you used secure NAT) Not the Client on Android. If the log still says it's trying to connect on upd 1194 the ovpn.config is wrong or your still using the original version before you made the changes.

This is the best free openvpn client I found for Android https://play.google.com/store/apps/deta ... n&hl=en_US . You can make all the changes to the config file from inside the app.
Thank you, going to try it

Re: Cannot connect from Android phone

Posted: Wed Oct 03, 2018 7:57 pm
by iamnaok
Looks like my softether server on the remote windows machine doesnt respond, although the server had been started

Re: Cannot connect from Android phone

Posted: Wed Oct 03, 2018 8:50 pm
by cmd wh0ami
When you set up the server did you enable Secure Nat or did you Bridge to eth0 or wlan0?

Re: Cannot connect from Android phone

Posted: Sat Oct 06, 2018 3:59 pm
by iamnaok
cmd wh0ami wrote:
Wed Oct 03, 2018 8:50 pm
When you set up the server did you enable Secure Nat or did you Bridge to eth0 or wlan0?
I have no idea what it is...

Re: Cannot connect from Android phone

Posted: Sat Oct 06, 2018 6:22 pm
by cmd wh0ami
SoftEther Server Manager / Manage Virtual Hub / Virtual Nat and Virtual DHCP Server (SecureNAT) / Enable SecureNAT (the default settings are fine to use)

or another option if you're behind a router that will handle DHCP

SoftEther Server Manager / Local Bridge Setting / Select the Virtual Hub to Bridge to (vpn or whatever you named your virtual hub) / Bridge with Physical Existing Network Adapter / LAN Adapter (eth0 or wlan0 ect...)

If you don't either enable SecureNAT... or bridge to a interface like eth0 or wlan0... Your not going to be able to connect.

But don't enable both options at the same time....