Sample Header Ad - 728x90

Change IPSec IKEV2 VPN Default Ports 500 & 4500 To Anothers

1 vote
0 answers
190 views
For some reason OpenVPN is working on my local machine very well, But IPSec IKEV2 VPN not & it only works when OpenVPN is connect. I have a domain for IPSec IKEV2 VPN & in local machine vpn is using port 443. Tell what should i do to force vpn workable on my local machine without OpenVPN. Should i change port 443 on server or change ports 500 & 4500? I followed the link below for setup IKEv2 VPN Using Strongswan and Let's encrypt on CentOS 7 With Some Changes. How to Setup IKEv2 VPN Using Strongswan and Let's encrypt on CentOS 7 My Let's encrypt commands is like this : curl https://get.acme.sh | sh ~/.acme.sh/acme.sh --set-default-ca --server letsencrypt ~/.acme.sh/acme.sh --register-account -m helius.dev@gmail.com ~/.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 Certificate Copy : 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 config : #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 And here is secrets file : nano -K /etc/strongswan/ipsec.secrets : RSA "private.key" test : EAP "123" Let explain problem again. Some firewall rules on my wi-fi internet provider are blocking vpn (ikev2 - l2tp - pptp) But openvps works like a charm. When openvpn is working i can connect to ikev2 vpn by upper config. Tell me what should i change about ikev2 to work whithout openvpn. Fist step i think i should chanage ports 500 & 4500 on server. I am right? But how? **/etc/strongswan/ipsec.d/** This file has no place for define custom ports!!!
Asked by helius.dev (21 rep)
Jan 16, 2024, 07:06 PM
Last activity: Jan 17, 2024, 03:01 AM