Hi all sorry if I'm digging this up. But im trying to get a EAP ipsec server running on my AC88U to connect to with Strongswan on Android but it only seems to support PSK on the ui. I tried this:
@Sh0cker54
Merlin firmware supports ipsec.postconf and strongswan.postconf since 384.9
So no need additional script to build IKEv2 server for windows 10 clients.
nano /jffs/scripts/ipsec.postconf
Code:
#!/bin/sh
CONFIG=$1
source /usr/sbin/helper.sh
pc_append "" $CONFIG
pc_append "ca letsencrypt" $CONFIG
pc_append " cacert=/jffs/.le/$(nvram get ddns_hostname_x)/chain.pem" $CONFIG
pc_append " auto=add" $CONFIG
pc_append "" $CONFIG
pc_append "conn IKEv2-EAP" $CONFIG
pc_append " keyexchange=ikev2" $CONFIG
pc_append " left=$(nvram get wan0_ipaddr)" $CONFIG
pc_append " leftid=@$(nvram get ddns_hostname_x)" $CONFIG
pc_append " leftsubnet=0.0.0.0/0" $CONFIG
pc_append " leftfirewall=yes" $CONFIG
pc_append " lefthostaccess=yes" $CONFIG
pc_append " leftauth=pubkey" $CONFIG
pc_append " leftcert=/jffs/.le/$(nvram get ddns_hostname_x)/cert.pem" $CONFIG
pc_append " right=%any" $CONFIG
pc_append " rightdns=$(nvram get lan_ipaddr)" $CONFIG
pc_append " rightsourceip=10.10.11.0/24" $CONFIG
pc_append " rightauth=eap-mschapv2" $CONFIG
pc_append " eap_identity=%any" $CONFIG
pc_append " dpdtimeout=30s" $CONFIG
pc_append " dpdaction=clear" $CONFIG
pc_append " dpddelay=10s" $CONFIG
pc_append " auto=add" $CONFIG
nano /jffs/scripts/strongswan.postconf
Code:
#!/bin/sh
CONFIG=$1
source /usr/sbin/helper.sh
pc_append ": RSA /jffs/.le/$(nvram get ddns_hostname_x)/domain.key" /etc/ipsec.secrets
chmod +x /jffs/scripts/ipsec.postconf /jffs/scripts/strongswan.postconf
but when I run ipsec.postconf i get:
admin@RT-AC88U-3EA8:/jffs/scripts# ./ipsec.postconf
./ipsec.postconf: line 5: can't create : nonexistent directory
./ipsec.postconf: line 6: can't create : nonexistent directory
./ipsec.postconf: line 7: can't create : nonexistent directory
./ipsec.postconf: line 8: can't create : nonexistent directory
./ipsec.postconf: line 9: can't create : nonexistent directory
./ipsec.postconf: line 10: can't create : nonexistent directory
./ipsec.postconf: line 11: can't create : nonexistent directory
./ipsec.postconf: line 12: can't create : nonexistent directory
./ipsec.postconf: line 13: can't create : nonexistent directory
./ipsec.postconf: line 14: can't create : nonexistent directory
./ipsec.postconf: line 15: can't create : nonexistent directory
./ipsec.postconf: line 16: can't create : nonexistent directory
./ipsec.postconf: line 17: can't create : nonexistent directory
./ipsec.postconf: line 18: can't create : nonexistent directory
./ipsec.postconf: line 19: can't create : nonexistent directory
./ipsec.postconf: line 20: can't create : nonexistent directory
./ipsec.postconf: line 21: can't create : nonexistent directory
./ipsec.postconf: line 22: can't create : nonexistent directory
./ipsec.postconf: line 23: can't create : nonexistent directory
./ipsec.postconf: line 24: can't create : nonexistent directory
./ipsec.postconf: line 25: can't create : nonexistent directory
./ipsec.postconf: line 26: can't create : nonexistent directory
./ipsec.postconf: line 27: can't create : nonexistent directory
What am I doing wrong? In the script i simply replaced ddns_hostname_x with my ddns hostname