Ändern Sie die IPSec IKEV2 VPN-Standardports 500 und 4500 in andere

Ändern Sie die IPSec IKEV2 VPN-Standardports 500 und 4500 in andere

Aus irgendeinem Grund funktioniert OpenVPN auf meinem lokalen Rechner sehr gut, aber IPSec IKEV2 VPN nicht und es funktioniert nur, wenn OpenVPN verbunden ist.
Ich habe eine Domäne für IPSec IKEV2 VPN und auf dem lokalen Rechner verwendet VPN Port 443.
Sagen Sie mir, was ich tun muss, um VPN auf meinem lokalen Rechner ohne OpenVPN funktionsfähig zu machen.
Soll ich Port 443 auf dem Server ändern oder die Ports 500 und 4500 ändern?


Ich bin dem unten stehenden Link gefolgt, um IKEv2 VPN mit Strongswan und Let’s Encrypt auf CentOS 7 mit einigen Änderungen einzurichten.

So richten Sie IKEv2 VPN mit Strongswan und Let’s Encrypt unter CentOS 7 ein

Mein Let’s Encrypt-Befehl lautet wie folgt:

curl https://get.acme.sh | sh
~/.acme.sh/acme.sh --set-default-ca --server letsencrypt
~/.acme.sh/acme.sh --register-account -m [email protected]
~/.acme.sh/acme.sh --issue -d my_domain.com --keylength 4096 --standalone --force
service httpd stop
~/.acme.sh/acme.sh --issue -d my_domain.com --keylength 4096 --standalone --force

Your cert is in: /root/.acme.sh/my_domain.com/my_domain.com.cer
Your cert key is in: /root/.acme.sh/my_domain.com/my_domain.com.key
The intermediate CA cert is in: /root/.acme.sh/my_domain.com/ca.cer
And the full chain certs is there: /root/.acme.sh/my_domain.com/fullchain.cer

~/.acme.sh/acme.sh --installcert -d my_domain.com --keylength 4096 --key-file /root/private.key --fullchain-file /root/cert.crt

service httpd start
service httpd status

Zertifikatskopie:

sudo cp /root/private.key /etc/strongswan/ipsec.d/private/
sudo cp /root/cert.crt /etc/strongswan/ipsec.d/certs/
sudo cp /root/.acme.sh/p02.artemis-art.buzz/ca.cer /etc/strongswan/ipsec.d/cacerts/

StrongSwan-Konfiguration:

#global configuration IPsec
#chron logger
config setup
    charondebug="ike 1, knl 1, cfg 0"
    uniqueids=no

#define new ipsec connection
conn hakase-vpn
    auto=add
    compress=no
    type=tunnel
    keyexchange=ikev2
    ike=aes128-sha1-modp1024,aes128-sha1-modp1536,aes128-sha1-modp2048,aes128-sha256-ecp256,aes128-sha256-modp1024,aes128-sha256-modp1536,aes128-sha256-modp2048,aes256-aes128-sha256-sha1-modp2048-modp4096-modp1024,aes256-sha1-modp1024,aes256-sha256-modp1024,aes256-sha256-modp1536,aes256-sha256-modp2048,aes256-sha256-modp4096,aes256-sha384-ecp384,aes256-sha384-modp1024,aes256-sha384-modp1536,aes256-sha384-modp2048,aes256-sha384-modp4096,aes256gcm16-aes256gcm12-aes128gcm16-aes128gcm12-sha256-sha1-modp2048-modp4096-modp1024,3des-sha1-modp1024!
    esp=aes128-aes256-sha1-sha256-modp2048-modp4096-modp1024,aes128-sha1,aes128-sha1-modp1024,aes128-sha1-modp1536,aes128-sha1-modp2048,aes128-sha256,aes128-sha256-ecp256,aes128-sha256-modp1024,aes128-sha256-modp1536,aes128-sha256-modp2048,aes128gcm12-aes128gcm16-aes256gcm12-aes256gcm16-modp2048-modp4096-modp1024,aes128gcm16,aes128gcm16-ecp256,aes256-sha1,aes256-sha256,aes256-sha256-modp1024,aes256-sha256-modp1536,aes256-sha256-modp2048,aes256-sha256-modp4096,aes256-sha384,aes256-sha384-ecp384,aes256-sha384-modp1024,aes256-sha384-modp1536,aes256-sha384-modp2048,aes256-sha384-modp4096,aes256gcm16,aes256gcm16-ecp384,3des-sha1!
    fragmentation=yes
    forceencaps=yes
    dpdaction=clear
    dpddelay=300s
    rekey=no
    left=%any
    leftid=@my_domain.com
    leftcert=cert.crt
    leftsendcert=always
    leftsubnet=0.0.0.0/0
    right=%any
    rightid=%any
    rightauth=eap-mschapv2
    rightsourceip=10.15.1.0/24
    rightdns=1.1.1.1,8.8.8.8
    rightsendcert=never
    eap_identity=%identity

Und hier ist die Geheimdatei:

nano -K /etc/strongswan/ipsec.secrets

: RSA "private.key"
test : EAP "123"

Lassen Sie mich das Problem noch einmal erklären.
Einige Firewall-Regeln meines WLAN-Internetproviders blockieren VPN (IKEV2 – L2TP – PPTP),
aber OpenVPN funktioniert einwandfrei.
Wenn OpenVPN funktioniert, kann ich über die obere Konfiguration eine Verbindung zu IKEV2 VPN herstellen.
Sagen Sie mir, was ich an IKEV2 ändern muss, damit es ohne OpenVPN funktioniert. Als ersten Schritt sollte ich wohl die Ports 500 und 4500 auf dem Server ändern.
Habe ich recht?
Aber wie?
/etc/strongswan/ipsec.d/In dieser Datei ist kein Platz zum Definieren benutzerdefinierter Ports!!!

verwandte Informationen