Guest User

OpenWrt + Strongswan VPN issue

a guest
Oct 25th, 2013
681
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.96 KB | None | 0 0
  1. root@OpenWrt:/usr/local/bin# uname -a
  2. Linux OpenWrt 3.3.8 #1 Sat Mar 23 16:49:30 UTC 2013 mips GNU/Linux
  3.  
  4. root@OpenWrt:/usr/local/bin# opkg list-installed strongswan*
  5. strongswan - 5.0.0-1
  6. strongswan-charon - 5.0.0-1
  7. strongswan-default - 5.0.0-1
  8. strongswan-mod-aes - 5.0.0-1
  9. strongswan-mod-af-alg - 5.0.0-1
  10. strongswan-mod-attr - 5.0.0-1
  11. strongswan-mod-blowfish - 5.0.0-1
  12. strongswan-mod-constraints - 5.0.0-1
  13. strongswan-mod-des - 5.0.0-1
  14. strongswan-mod-dhcp - 5.0.0-1
  15. strongswan-mod-dnskey - 5.0.0-1
  16. strongswan-mod-eap-identity - 5.0.0-1
  17. strongswan-mod-eap-md5 - 5.0.0-1
  18. strongswan-mod-eap-mschapv2 - 5.0.0-1
  19. strongswan-mod-farp - 5.0.0-1
  20. strongswan-mod-fips-prf - 5.0.0-1
  21. strongswan-mod-gcrypt - 5.0.0-1
  22. strongswan-mod-gmp - 5.0.0-1
  23. strongswan-mod-hmac - 5.0.0-1
  24. strongswan-mod-kernel-netlink - 5.0.0-1
  25. strongswan-mod-md4 - 5.0.0-1
  26. strongswan-mod-md5 - 5.0.0-1
  27. strongswan-mod-nonce - 5.0.0-1
  28. strongswan-mod-openssl - 5.0.0-1
  29. strongswan-mod-pem - 5.0.0-1
  30. strongswan-mod-pgp - 5.0.0-1
  31. strongswan-mod-pkcs1 - 5.0.0-1
  32. strongswan-mod-pkcs11 - 5.0.0-1
  33. strongswan-mod-pkcs8 - 5.0.0-1
  34. strongswan-mod-pubkey - 5.0.0-1
  35. strongswan-mod-random - 5.0.0-1
  36. strongswan-mod-resolve - 5.0.0-1
  37. strongswan-mod-revocation - 5.0.0-1
  38. strongswan-mod-sha1 - 5.0.0-1
  39. strongswan-mod-sha2 - 5.0.0-1
  40. strongswan-mod-socket-default - 5.0.0-1
  41. strongswan-mod-stroke - 5.0.0-1
  42. strongswan-mod-test-vectors - 5.0.0-1
  43. strongswan-mod-updown - 5.0.0-1
  44. strongswan-mod-x509 - 5.0.0-1
  45. strongswan-mod-xauth-eap - 5.0.0-1
  46. strongswan-mod-xauth-generic - 5.0.0-1
  47. strongswan-mod-xcbc - 5.0.0-1
  48. strongswan-utils - 5.0.0-1
  49.  
  50.  
  51. root@OpenWrt:/usr/local/bin# ipsec statusall
  52. Status of IKE charon daemon (strongSwan 5.0.0, Linux 3.3.8, mips):
  53.   uptime: 21 minutes, since Oct 26 04:05:32 2013
  54.   malloc: sbrk 139264, mmap 0, used 123944, free 15320
  55.   worker threads: 6 of 16 idle, 9/1/0/0 working, job queue: 0/0/0/0, scheduled: 0
  56.   loaded plugins: charon test-vectors pkcs11 aes des blowfish sha1 sha2 md4 md5 random nonce x509 revocation constraints pubkey pkcs1 pkcs8 pgp dnskey pem openssl gcrypt af-alg fips-prf gmp xcbc hmac attr kernel-netlink resolve socket-default farp stroke updown eap-identity eap-md5 eap-mschapv2 xauth-generic xauth-eap dhcp
  57. Listening IP addresses:
  58.   192.168.1.1
  59.   116.xx.xx.253
  60. Connections:
  61. Security Associations (0 up, 0 connecting):
  62.   none
  63. root@OpenWrt:/usr/local/bin#
  64.  
  65.  
  66. root@OpenWrt:/usr/local/bin#logread
  67. Oct 26 04:31:12 OpenWrt daemon.info syslog: 05[NET] received packet: from 182.xxx.xx.111[45149] to 116.xxx.xxx.253[500]
  68. Oct 26 04:31:12 OpenWrt daemon.info syslog: 05[ENC] parsed IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) ]
  69. Oct 26 04:31:12 OpenWrt daemon.info syslog: 05[IKE] no IKE config found for 116.xxx.xxx.253...182.xxx.xxx.111, sending NO_PROPOSAL_CHOSEN
  70. Oct 26 04:31:12 OpenWrt daemon.info syslog: 05[ENC] generating IKE_SA_INIT response 0 [ N(NO_PROP) ]
  71. Oct 26 04:31:12 OpenWrt daemon.info syslog: 05[NET] sending packet: from 116.xxx.xxx.253[500] to 182.xxx.xxx.111[45149]
  72. Oct 26 04:31:13 OpenWrt daemon.info syslog: 04[NET] received packet: from 182.xxx.xxx.111[45149] to 116.xxx.xxx.253[500]
  73. Oct 26 04:31:13 OpenWrt daemon.info syslog: 04[ENC] parsed IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) ]
  74. Oct 26 04:31:13 OpenWrt daemon.info syslog: 04[IKE] no IKE config found for 116.xxx.xxx.253...182.xxx.xxx.111, sending NO_PROPOSAL_CHOSEN
  75. Oct 26 04:31:13 OpenWrt daemon.info syslog: 04[ENC] generating IKE_SA_INIT response 0 [ N(NO_PROP) ]
  76. Oct 26 04:31:13 OpenWrt daemon.info syslog: 04[NET] sending packet: from 116.xxx.xxx.253[500] to 182.xxx.xxx.111[45149]
  77. root@OpenWrt:/usr/local/bin#
  78.  
  79.  
  80. root@OpenWrt:/usr/local/bin# cat /etc/ipsec.conf
  81. # ipsec.conf - strongSwan IPsec configuration file
  82.  
  83. # basic configuration
  84.  
  85. config setup
  86.         # plutodebug=all
  87.         # crlcheckinterval=600
  88.         # strictcrlpolicy=yes
  89.         # cachecrls=yes
  90.         # nat_traversal=yes
  91.         # charonstart=no
  92.         # plutostart=no
  93. #
  94. conn %default
  95. #       left=%any
  96. #       leftsubnet=0.0.0.0/0
  97. #       leftfirewall=yes
  98. #       leftcert=serverCert.pem
  99. #       right=%any
  100. #       rightsubnet=192.168.0.0/24
  101. #       rightsourceip=%dhcp
  102.  
  103. conn ikev2
  104.         keyexchange=ikev2
  105.         left=%any
  106.         leftsubnet=0.0.0.0/0
  107.         leftsourceip=192.168.1.1
  108.         leftauth=pubkey
  109.         leftcert=serverCert.pem
  110.         right=%any
  111.         rightsourceip=%dhcp
  112.         rightauth=pubkey
  113.  
  114.  
  115. root@OpenWrt:/usr/local/bin# cat /etc/strongswan.conf
  116. # strongswan.conf - strongSwan configuration file
  117.  
  118. charon {
  119.  
  120.   dns1 = 192.168.1.1
  121.  
  122.   threads = 16
  123.  
  124.   plugins {
  125.  
  126.     dhcp {
  127.         server = 192.168.1.1
  128.     }
  129.   }
  130.  
  131. }
  132.  
  133. pluto {
  134.  
  135. }
  136.  
  137. libstrongswan {
  138.  
  139.   #  set to no, the DH exponent size is optimized
  140.   #  dh_exponent_ansi_x9_42 = no
  141. }
  142.  
  143.  
  144. root@OpenWrt:/usr/local/bin# cat /etc/ipsec.secrets
  145. # /etc/ipsec.secrets - strongSwan IPsec secrets file
  146. : RSA serverKey.pem
  147. guestuser : XAUTH "youkoso"
  148. iPhone5     : XAUTH "kakakaka"
  149. android : EAP "hogehoge"
Advertisement
Add Comment
Please, Sign In to add comment