{"id":468,"date":"2014-05-02T15:47:32","date_gmt":"2014-05-03T00:47:32","guid":{"rendered":"\/blog\/?p=468"},"modified":"2023-09-21T09:38:45","modified_gmt":"2023-09-21T00:38:45","slug":"openwrt-strongswan-ipsec-vpn-%ec%84%a4%ec%a0%95","status":"publish","type":"post","link":"https:\/\/hasu0707.duckdns.org\/blog\/?p=468","title":{"rendered":"OpenWRT StrongSwan IPSec VPN \uc124\uc815"},"content":{"rendered":"\n<p><span style=\"font-family: Courier New;\">\u25a0 \uc2dc\ud5d8 \ud658\uacbd<\/span><br \/><br \/><b><span style=\"font-family: Gulim,\uad74\ub9bc,AppleGothic,sans-serif; font-size: 10pt;\">- OpenBSD<\/span><br \/><\/b><span style=\"font-family: Gulim,\uad74\ub9bc,AppleGothic,sans-serif; font-size: 10pt;\">WAN IP: 10.10.10.51<\/span><br \/><span style=\"font-family: Gulim,\uad74\ub9bc,AppleGothic,sans-serif; font-size: 10pt;\">LAN IP : 192.168.10.254<\/span><br \/><span style=\"font-family: Gulim,\uad74\ub9bc,AppleGothic,sans-serif; font-size: 10pt;\">LAN Network : 192.168.10.0\/24<\/span><br \/><span style=\"font-family: Gulim,\uad74\ub9bc,AppleGothic,sans-serif; font-size: 10pt;\">Test PC : 192.168.10.2<\/span><b><br \/><br \/><span style=\"font-family: Gulim,\uad74\ub9bc,AppleGothic,sans-serif; font-size: 10pt;\">- OpenWRT Router<\/span><br \/><\/b><span style=\"font-family: Gulim,\uad74\ub9bc,AppleGothic,sans-serif; font-size: 10pt;\">WAN IP : 10.10.10.250<\/span><br \/><span style=\"font-family: Gulim,\uad74\ub9bc,AppleGothic,sans-serif; font-size: 10pt;\">LAN IP : 192.168.1.1<\/span><br \/><span style=\"font-family: Gulim,\uad74\ub9bc,AppleGothic,sans-serif; font-size: 10pt;\">LAN Network : 192.168.1.0\/24<\/span><br \/><span style=\"font-family: Gulim,\uad74\ub9bc,AppleGothic,sans-serif; font-size: 10pt;\">Test PC : 192.168.1.2<\/span><br \/><br \/><span style=\"font-family: Courier New;\">\u25a0 OpenWRT Router \uc124\uc815<\/span><br \/><br \/><span style=\"font-family: Courier New;\">\u25b6 \/etc\/config\/ipsec<\/span><br \/><br \/><span style=\"font-family: Courier New;\"># \/etc\/config\/ipsec<br \/>config 'ipsec'<br \/>&nbsp; option 'zone' 'vpn'<br \/>&nbsp; list listen ''<br \/><br \/>config 'remote' 'acme'<br \/>&nbsp; option 'enabled' '1'<br \/>&nbsp; option 'gateway' '10.10.10.51'<br \/>&nbsp; option 'authentication_method' 'psk'<br \/>&nbsp; option 'pre_shared_key' '7d5813ab'<br \/>&nbsp; list&nbsp;&nbsp; 'p1_proposal' 'pre_g2_aes_sha1'<br \/>&nbsp; list&nbsp;&nbsp; 'tunnel' 'acme_lan'<br \/>&nbsp; option 'local_identifier' '<b>ac2014@_utm<\/b>'<br \/>&nbsp; option 'remote_identifier' '<b>charon@_utm<\/b>'<br \/><br \/>config 'p1_proposal' 'pre_g2_aes_sha1'<br \/>&nbsp; option 'encryption_algorithm' 'aes256'<br \/>&nbsp; option 'hash_algorithm' 'sha1'<br \/>&nbsp; option 'dh_group' 'modp2048'<br \/><br \/>config 'tunnel' 'acme_lan'<br \/>&nbsp; option 'local_subnet' '192.168.1.0\/24'<br \/>&nbsp; option 'remote_subnet' '192.168.10.0\/24'<br \/>&nbsp; option 'p2_proposal' 'g2_aes_sha1'<br \/><br \/>config 'p2_proposal' 'g2_aes_sha1'<br \/>&nbsp; option 'encryption_algorithm' 'aes256'<br \/>&nbsp; option 'authentication_algorithm' 'sha1'<br \/>&nbsp; option 'pfs_group' 'modp2048'<br \/><\/span><br \/><span style=\"font-family: Courier New;\">------------------------------------------------------------------------------<\/span><br \/><br \/><span style=\"font-family: Courier New;\">\u25b6 \/etc\/init.d\/ipsec<\/span><br \/><br \/><span style=\"font-family: Courier New;\">#!\/bin\/sh \/etc\/rc.common<\/span><br \/><span style=\"font-family: Courier New;\">#\/etc\/init.d\/ipsec - version 4<\/span><br \/><br \/><span style=\"font-family: Courier New;\">NAME=ipsec<\/span><br \/><span style=\"font-family: Courier New;\">START=60<\/span><br \/><span style=\"font-family: Courier New;\">STOP=60<\/span><br \/><br \/><span style=\"font-family: Courier New;\">. \/lib\/functions.sh<\/span><br \/><br \/><span style=\"font-family: Courier New;\">FileSecrets=\/var\/ipsec\/ipsec.secrets<\/span><br \/><span style=\"font-family: Courier New;\">FileConn=\/var\/ipsec\/ipsec.conf<\/span><br \/><span style=\"font-family: Courier New;\">FileCommon=\/var\/ipsec\/strongswan.conf<\/span><br \/><br \/><span style=\"font-family: Courier New;\">FolderCerts=\/var\/ipsec\/ipsec.d<\/span><br \/><br \/><span style=\"font-family: Courier New;\">ConfigUser()<\/span><br \/><span style=\"font-family: Courier New;\">{<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local enabled<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local xauth<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local name<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local password<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local crt_subject<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get_bool enabled $1 enabled 0<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; [[ \"$enabled\" == \"0\" ]] &amp;&amp; return<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get_bool xauth&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $1 xauth&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $1 name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"\"<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; password&nbsp;&nbsp;&nbsp; $1 password&nbsp;&nbsp;&nbsp; \"\"<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; if [ $xauth -eq 1 -a \"$name\" != \"\" -a \"$password\" != \"\" ]; then<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; echo \"$name : XAUTH \\\"$password\\\"\" &gt;&gt; $FileSecrets<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; fi<\/span><br \/><span style=\"font-family: Courier New;\">}<\/span><br \/><br \/><span style=\"font-family: Courier New;\">ConfigPhase1() {<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local encryption_algorithm<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local hash_algorithm<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local dh_group<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get encryption_algorithm&nbsp; \"$1\" encryption_algorithm<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get hash_algorithm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"$1\" hash_algorithm<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get dh_group&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"$1\" dh_group<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; Phase1Proposal=${Phase1Proposal}\",\"${encryption_algorithm}-${hash_algorithm}-${dh_group}<\/span><br \/><span style=\"font-family: Courier New;\">}<\/span><br \/><br \/><span style=\"font-family: Courier New;\">ConfigTunnel() {<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local local_subnet<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local local_nat<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local remote_subnet<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local p2_proposal<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local pfs_group<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local encryption_algorithm<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local authentication_algorithm<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get local_subnet&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"$1\"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local_subnet<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get local_nat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"$1\"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local_nat \"\"<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get remote_subnet&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"$1\"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; remote_subnet<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get p2_proposal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"$1\"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p2_proposal<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get pfs_group&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"$p2_proposal\" pfs_group<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get encryption_algorithm&nbsp;&nbsp;&nbsp;&nbsp; \"$p2_proposal\" encryption_algorithm<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get authentication_algorithm \"$p2_proposal\" authentication_algorithm<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; [[ \"$local_nat\" != \"\" ]] &amp;&amp; local_subnet=$local_nat<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; p2_proposal=\"${encryption_algorithm}-${authentication_algorithm}-${pfs_group}\"<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"conn $ConfigName-$1\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; keyexchange=ike\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; ikelifetime=24h\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; keylife=23h\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; rekeymargin=5m\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; keyingtries=100\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; mobike=no\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; rekey=no\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; reauth=no\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; left=$LocalGateway\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; right=$RemoteGateway\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; leftsubnet=$local_subnet\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; if [ \"$AuthenticationMethod\" = \"psk\" ]; then<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; echo \"&nbsp; authby=secret\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; echo \"&nbsp; rightsubnet=$remote_subnet\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; echo \"&nbsp; auto=start\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; elif [ \"$AuthenticationMethod\" = \"xauth_psk_server\" ]; then<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; echo \"&nbsp; authby=xauthpsk\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; echo \"&nbsp; xauth=server\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; echo \"&nbsp; modeconfig=pull\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; echo \"&nbsp; rightsourceip=$remote_subnet\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; echo \"&nbsp; auto=add\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; fi<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; if [ \"$LocalIdentifier\" != \"\" ]; then<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; echo \"&nbsp; leftid=$LocalIdentifier\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; fi<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; if [ \"$RemoteIdentifier\" != \"\" ]; then<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; echo \"&nbsp; rightid=$RemoteIdentifier\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; fi<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; auth=esp\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; esp=$p2_proposal\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; ike=$Phase1Proposal\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; type=tunnel\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">}<\/span><br \/><br \/><span style=\"font-family: Courier New;\">ConfigStrongSwan() {<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"threads = 16\" &gt; $FileCommon<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"replay_window = 32\" &gt;&gt; $FileCommon<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"dos_protection = no\" &gt;&gt; $FileCommon<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"block_threshold = 2000\" &gt;&gt; $FileCommon<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"cookie_threshold = 2000\" &gt;&gt; $FileCommon<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"init_limit_half_open = 2000\" &gt;&gt; $FileCommon<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"retransmit_timeout = 60\" &gt;&gt; $FileCommon<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"retransmit_tries = 30\" &gt;&gt; $FileCommon<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"install_virtual_ip = no\" &gt;&gt; $FileCommon<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"install_routes = no\" &gt;&gt; $FileCommon<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"close_ike_on_child_failure = yes\" &gt;&gt; $FileCommon<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"ikesa_table_size = 512\" &gt;&gt; $FileCommon<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"ikesa_table_segments = 16\" &gt;&gt; $FileCommon<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"reuse_ikesa = no\" &gt;&gt; $FileCommon<\/span><br \/><span style=\"font-family: Courier New;\">}<\/span><br \/><br \/><span style=\"font-family: Courier New;\">ConfigRemote() {<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local enabled<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local gateway<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local pre_shared_key<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local authentication_method<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local local_identifier<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; local remote_identifier<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; ConfigName=$1<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get_bool enabled \"$1\" enabled 0<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; [[ \"$enabled\" == \"0\" ]] &amp;&amp; return<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get gateway&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"$1\" gateway<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get pre_shared_key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"$1\" pre_shared_key<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get authentication_method \"$1\" authentication_method<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get local_identifier&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"$1\" local_identifier<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_get remote_identifier&nbsp;&nbsp;&nbsp;&nbsp; \"$1\" remote_identifier<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; AuthenticationMethod=$authentication_method<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; LocalIdentifier=$local_identifier<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; RemoteIdentifier=$remote_identifier<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; RemoteGateway=$gateway<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; if [ \"$RemoteGateway\" = \"any\" ]; then<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; RemoteGateway=\"%any\"<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; LocalGateway=`ip route get 1.1.1.1 | awk -F\"src\" '\/src\/{gsub(\/ \/,\"\");print $2}'`<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; else<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; LocalGateway=`ip route get $RemoteGateway | awk -F\"src\" '\/src\/{gsub(\/ \/,\"\");print $2}'`<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; fi<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"$LocalGateway $RemoteGateway : PSK \\\"$pre_shared_key\\\"\" &gt;&gt; $FileSecrets<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; Phase1Proposal=\"\"<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_list_foreach \"$1\" p1_proposal ConfigPhase1<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; Phase1Proposal=`echo $Phase1Proposal | cut -b 2-`<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; config_list_foreach \"$1\" tunnel ConfigTunnel<\/span><br \/><span style=\"font-family: Courier New;\">}<\/span><br \/><br \/><span style=\"font-family: Courier New;\">PrepareEnvironment() {<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; for d in cacerts aacerts ocspcerts crls acerts; do<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; mkdir -p $FolderCerts\/$d 2&gt;\/dev\/null<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; done<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; if [ ! -L \/etc\/ipsec.d ]; then<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; rm -rf \/etc\/ipsec.d 2&gt;\/dev\/null<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; ln -s $FolderCerts \/etc\/ipsec.d<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; fi<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; if [ ! -L \/etc\/ipsec.secrets ]; then<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; rm \/etc\/ipsec.secrets 2&gt;\/dev\/null<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; ln -s $FileSecrets \/etc\/ipsec.secrets<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; fi<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; if [ ! -L \/etc\/strongswan.conf ]; then<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; rm \/etc\/strongswan.conf 2&gt;\/dev\/null<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; ln -s $FileCommon \/etc\/strongswan.conf<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; fi<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; if [ ! -L \/etc\/ipsec.conf ]; then<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; rm \/etc\/ipsec.conf 2&gt;\/dev\/null<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; ln -s $FileConn \/etc\/ipsec.conf<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; fi<\/span><br \/><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"# generated by \/etc\/init.d\/ipsec\" &gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"version 2\" &gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"config setup\" &gt;&gt; $FileConn<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"&nbsp; charondebug = \\\"ike 2,knl 2\\\"\" &gt;&gt; $FileConn<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; echo \"# generated by \/etc\/init.d\/ipsec\" &gt; $FileSecrets<\/span><br \/><span style=\"font-family: Courier New;\">}<\/span><br \/><br \/><span style=\"font-family: Courier New;\">CheckInstallation() {<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; if [ ! -x \/usr\/sbin\/ip ]; then<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; echo \/usr\/sbin\/ip missing<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; echo install with \\\"opkg install ip\\\"<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; exit<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; fi<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; for f in aes authenc cbc hmac md5 sha1; do<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; if [ `opkg list kmod-crypto-$f | wc -l` -eq 0 ]; then<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo kmod-crypto-$f missing<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo install with&nbsp; \\\"opkg install kmod-crypto-$f --nodeps\\\"<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; fi<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; done<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; for f in aes gmp hmac kernel-netlink md5 random sha1 updown attr resolve; do<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; if [ ! -f \/usr\/lib\/ipsec\/plugins\/libstrongswan-${f}.so ]; then<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo \/usr\/lib\/ipsec\/plugins\/$f missing<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo install with \\\"opkg install strongswan-mod-$f --nodeps\\\"<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp;&nbsp;&nbsp; fi<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; done<\/span><br \/><span style=\"font-family: Courier New;\">}<\/span><br \/><br \/><span style=\"font-family: Courier New;\">start() {<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; CheckInstallation<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; PrepareEnvironment<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; ConfigStrongSwan<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; config_load users<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_foreach ConfigUser user<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; config_load ipsec<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; config_foreach ConfigRemote remote<\/span><br \/><br \/><span style=\"font-family: Courier New;\">&nbsp; \/usr\/sbin\/ipsec start<\/span><br \/><span style=\"font-family: Courier New;\">}<\/span><br \/><br \/><span style=\"font-family: Courier New;\">stop() {<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; \/usr\/sbin\/ipsec stop<\/span><br \/><span style=\"font-family: Courier New;\">}<\/span><br \/><br \/><span style=\"font-family: Courier New;\">------------------------------------------------------------------------------<\/span><br \/><br \/><span style=\"font-family: Courier New;\">\u25a0 OpenBSD \uc124\uc815<\/span><br \/><br \/><span style=\"font-family: Courier New;\">\u25b6 \/var\/_utm\/etc\/ipsec.conf<\/span><br \/><span style=\"font-family: Courier New;\">#####################################################################<br \/># Setup the IPSec IKE - 'test'<br \/>#####################################################################<br \/>ike dynamic esp tunnel from 192.168.10.0\/24 to 192.168.1.0\/24 local 10.10.10.51 peer 10.10.10.250 \\<br \/>&nbsp; main auth hmac-sha1 enc aes-256 group modp2048 lifetime 3600 \\<br \/>&nbsp; quick auth hmac-sha1 enc aes-256 group modp2048 lifetime 86400 \\<br \/>&nbsp; srcid 'charon@_utm' dstid 'ac2014@_utm' psk \"7d5813ab\" \\<br \/>&nbsp; tag 'IPSecIKE0001'<br \/><br \/><\/span><\/p><p style=\"text-align: left; clear: none; float: none;\"><img decoding=\"async\" editor_component=\"image_link\" src=\"\/blog\/wp-content\/uploads\/cms_xe\/img0236.jpg\" alt=\"\" \/><\/p><p><br \/><br \/><span style=\"font-family: Courier New;\">\u25b6 \ub77c\uc6b0\ud305 \ud14c\uc774\ube14 \ucd94\uac00<\/span><br \/><br \/><span style=\"font-family: Courier New;\">route add -inet 192.168.1.0\/24 192.168.10.254<\/span><br \/><br \/><span style=\"font-family: Courier New;\">\u25b6 VPN \uc5f0\uacb0 \ud655\uc778 (OpenWRT)<\/span><br \/><br \/><span style=\"font-family: Courier New;\">root@OpenWrt:\/etc\/config# <b>ipsec statusall<\/b><\/span><br \/><span style=\"font-family: Courier New;\">Status of IKE charon daemon (strongSwan 5.0.0, Linux 3.3.8, mips):<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; uptime: 3 minutes, since May 02 09:25:17 2014<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; malloc: sbrk 118784, mmap 0, used 101856, free 16928<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; worker threads: 6 of 16 idle, 9\/1\/0\/0 working, job queue: 0\/0\/0\/0, scheduled: 3<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; loaded plugins: charon pkcs11 aes des sha1 sha2 md5 random nonce x509 revocation constraints pubkey pkcs1 pkcs8 pgp dnskey pem fips-prf gmp xcbc hmac attr kernel-netlink resolve socket-default stroke updown xauth-generic dhcp uci<\/span><br \/><span style=\"font-family: Courier New;\">Listening IP addresses:<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; 10.10.10.250<\/span><br \/><span style=\"font-family: Courier New;\">&nbsp; 192.168.1.1<\/span><br \/><span style=\"font-family: Courier New;\">Connections:<\/span><br \/><span style=\"font-family: Courier New;\">acme-acme_lan:&nbsp; 10.10.10.250...10.10.10.51&nbsp; IKEv1<\/span><br \/><span style=\"font-family: Courier New;\">acme-acme_lan:&nbsp;&nbsp; local:&nbsp; [10.10.10.250] uses pre-shared key authentication<\/span><br \/><span style=\"font-family: Courier New;\">acme-acme_lan:&nbsp;&nbsp; remote: [10.10.10.51] uses pre-shared key authentication<\/span><br \/><span style=\"font-family: Courier New;\">acme-acme_lan:&nbsp;&nbsp; child:&nbsp; 192.168.1.0\/24 === 192.168.10.0\/24 TUNNEL<\/span><br \/><span style=\"font-family: Courier New;\">Security Associations (2 up, 0 connecting):<\/span><br \/><span style=\"font-family: Courier New;\">acme-acme_lan[2]: ESTABLISHED 101 seconds ago, 10.10.10.250[10.10.10.250]...10.10.10.51[10.10.10.51]<\/span><br \/><span style=\"font-family: Courier New;\">acme-acme_lan[2]: IKEv1 SPIs: 4eb6dc939cb992cc_i aca412bc4ed74980_r*, pre-shared key reauthentication in 2 hours<\/span><br \/><span style=\"font-family: Courier New;\">acme-acme_lan[2]: IKE proposal: AES_CBC_256\/HMAC_SHA1_96\/PRF_HMAC_SHA1\/MODP_2048<\/span><br \/><span style=\"font-family: Courier New;\">acme-acme_lan{1}:&nbsp; INSTALLED, TUNNEL, ESP SPIs: c9c25b9c_i 8b8a1502_o<\/span><br \/><span style=\"font-family: Courier New;\">acme-acme_lan{1}:&nbsp; AES_CBC_256\/HMAC_SHA1_96, 0 bytes_i, 0 bytes_o, rekeying in 43 minutes<\/span><br \/><span style=\"font-family: Courier New;\">acme-acme_lan{1}:&nbsp;&nbsp; 192.168.1.0\/24 === 192.168.10.0\/24<\/span><br \/><span style=\"font-family: Courier New;\">acme-acme_lan[1]: CONNECTING, 10.10.10.250[%any]...10.10.10.51[%any]<\/span><br \/><span style=\"font-family: Courier New;\">acme-acme_lan[1]: IKEv1 SPIs: f661063fe5d86514_i* 0000000000000000_r<\/span><br \/><span style=\"font-family: Courier New;\">acme-acme_lan[1]: Tasks queued: QUICK_MODE<\/span><br \/><span style=\"font-family: Courier New;\">acme-acme_lan[1]: Tasks active: ISAKMP_VENDOR ISAKMP_CERT_PRE MAIN_MODE ISAKMP_CERT_POST ISAKMP_NATD<\/span><br \/><br \/><span style=\"font-family: Courier New;\">\u25b6 VPN \uc5f0\uacb0 \ud655\uc778 (OpenBSD)<\/span><br \/><br \/><span style=\"font-family: Courier New;\"># <b>ipsecctl -vsa<\/b><br \/>FLOWS:<br \/>flow esp in from 192.168.1.0\/24 to 192.168.10.0\/24 peer 10.10.10.250 srcid charon@_utm dstid ac2014@_utm type use<br \/>flow esp out from 192.168.10.0\/24 to 192.168.1.0\/24 peer 10.10.10.250 srcid charon@_utm dstid ac2014@_utm type require<br \/><br \/>SAD:<br \/>esp tunnel from 10.10.10.250 to 10.10.10.51 spi 0x8419c640 auth hmac-sha1 enc aes-256<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sa: spi 0x8419c640 auth hmac-sha1 enc aes<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; state mature replay 16 flags 0x4&lt;tunnel&gt;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lifetime_cur: alloc 0 bytes 0 add 1399429397 first 0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lifetime_hard: alloc 0 bytes 0 add 86400 first 0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lifetime_soft: alloc 0 bytes 0 add 77760 first 0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address_src: 10.10.10.250<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address_dst: 10.10.10.51<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; identity_src: type ufqdn id 0: ac2014@_utm<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; identity_dst: type ufqdn id 0: charon@_utm<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src_mask: 255.255.255.0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dst_mask: 255.255.255.0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protocol: proto 0 flags 0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flow_type: type use direction in<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src_flow: 192.168.1.0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dst_flow: 192.168.10.0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tag: IPSecIKE0001<br \/>esp tunnel from 10.10.10.51 to 10.10.10.250 spi 0xc18b0b10 auth hmac-sha1 enc aes-256<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sa: spi 0xc18b0b10 auth hmac-sha1 enc aes<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; state mature replay 16 flags 0x4&lt;tunnel&gt;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lifetime_cur: alloc 0 bytes 18732 add 1399429397 first 1399429397<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lifetime_hard: alloc 0 bytes 0 add 86400 first 0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lifetime_soft: alloc 0 bytes 0 add 77760 first 0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address_src: 10.10.10.51<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address_dst: 10.10.10.250<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; identity_src: type ufqdn id 0: charon@_utm<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; identity_dst: type ufqdn id 0: ac2014@_utm<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src_mask: 255.255.255.0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dst_mask: 255.255.255.0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protocol: proto 0 flags 0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flow_type: type use direction out<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src_flow: 192.168.10.0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dst_flow: 192.168.1.0<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lifetime_lastuse: alloc 0 bytes 0 add 0 first 1399429621<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tag: IPSecIKE0001<br \/><\/span><br \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u25a0 \uc2dc\ud5d8 \ud658\uacbd &#8211; OpenBSDWAN IP: 10.10.10.51LAN IP : 192.168.10.254LAN Network : 192.168.10.0\/24Test PC : 192.168.10.2 &#8211; OpenWRT RouterWAN IP : 10.10.10.250LAN IP : 192.168.1.1LAN Network : 192.168.1.0\/24Test PC : 192.168.1.2 \u25a0 OpenWRT Router \uc124\uc815 \u25b6 \/etc\/config\/ipsec # \/etc\/config\/ipsecconfig &#8216;ipsec&#8217;&nbsp; option &#8216;zone&#8217; &#8216;vpn&#8217;&nbsp; list listen &#8221; config &#8216;remote&#8217; &#8216;acme&#8217;&nbsp; option &#8216;enabled&#8217; &#8216;1&#8217;&nbsp; option &#8216;gateway&#8217; &#8216;10.10.10.51&#8217;&nbsp; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[21],"tags":[],"class_list":["post-468","post","type-post","status-publish","format-standard","hentry","category-development_openwrt"],"_links":{"self":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=468"}],"version-history":[{"count":0,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/468\/revisions"}],"wp:attachment":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}