大网数据广告活动
服务器运维问答

IPSEC IKEv2 not hiding HTTPS

· 52CE 我爱测

I'm using Linux strongSwan U5.3.5/K4.4.0-116-generic on Ubuntu 16.04 with IOS 11 IKEv2 client. The connection could be successfully established on my client(IOS 11) and if I go to ip check webpage, e.g. myip.com it shows the VPN …

问题原文

原帖链接 · chrisky · CC BY-SA 3.0

I'm using Linux strongSwan U5.3.5/K4.4.0-116-generic on Ubuntu 16.04 with IOS 11 IKEv2 client.

The connection could be successfully established on my client(IOS 11) and if I go to ip check webpage, e.g. myip.com it shows the VPN server's address.

However, I found that if I connect to a customized port on the same server for HTTPS, it could get blocked by my evil nat firewall even when the IKEv2 is established.

My understanding is that IPSEC will create a tunnel through port 500/4500, and making all traffic encrypted. Therefore I am wondering how will my company or other(nation level) firewall distinguish between different traffic? i.e. drop my https request on a arbitary port.

I tried directly using ip address to access, i.e https://xx.xx.xx.xx:12345, but does not seem make a difference.

My suspect is that this tunnel is not a end-to-end(my iphone to server) tunnel. Because my iphone is behind NAT somehow the connection is not encrypted from my IOS to my company gateway. Is this the reason?

Here is the ipsec.conf conn:

config setup
    cachecrls=yes
    uniqueids=yes
    charondebug=""

conn %default
    keyingtries=%forever
    dpddelay=30s
    dpdtimeout=120s


conn IKEv2-EAP-TLS
    auto=add
    type=tunnel
    keyexchange=ikev2
    dpdaction=clear
    dpddelay=300s
    authby=pubkey
    left=%SERVERIP%
    leftid=%SERVERIP%
    leftsubnet=0.0.0.0/0
    leftcert=vpnSrvCert.der
    leftsendcert=always
    right=%any
    rightid=%any
    rightsourceip=10.10.10.0/24
    rightdns=8.8.8.8,8.8.4.4
    rightauth=eap-tls

[Update] After some trial-and-error, I believe the reason is what BillThor has described. I found that at a no censorship WIFI environment, when I connect to the HTTPS port on the same (IKEv2) server1, it's a seperate TCP link.

On the other hand, when I connected to another L2TP server2(not the HTTPS) from inside censored WIFI, I could successfully connect to the original server1's HTTPS port.

已采纳解答

原帖链接 · BillThor · CC BY-SA 3.0

VPN traffic is easily detected by packet inspection, or in this case just by the ports in use. It is quite possible your company is aware of what you are attempting or doing.

If your are trying to reach the same IP address as you are using to connect to the VPN, it will not be sent to the VPN. At a minimum, the address of the VPN server is connected to directly. The VPN may be able route the destination for ports not used by the VPN.

As your right side is in the 10.0.0.0/8 private address space, your IP address will undergo Network Address Translation on your end. This is prone to breakage if multiple devices on the same LAN are connecting to the same remote VPN server.

If you want your browser traffic to always be routed to the VPN, you will need to configure your browser to use a proxy server on an address reachable via the VPN. If your address is showing as your local IP address, it is traversing the VPN.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-03-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。