{"id":3020,"date":"2016-11-15T15:21:00","date_gmt":"2016-11-15T06:21:00","guid":{"rendered":"http:\/\/tsaitoh.net\/wp\/2016\/11\/15\/edgerouter-xl2tp-1\/"},"modified":"2016-11-15T15:21:00","modified_gmt":"2016-11-15T06:21:00","slug":"edgerouter-xl2tp-1","status":"publish","type":"post","link":"https:\/\/tsaitoh.net\/wp\/2016\/11\/15\/edgerouter-xl2tp-1\/","title":{"rendered":"EdgeRouter-X\u3067L2TP\u63a5\u7d9a\u3092\u30e1\u30fc\u30eb\u901a\u77e5"},"content":{"rendered":"<p> EdgeRouter-X \u304c\u5c4a\u304f\u524d\u306f\u3001linux \u30b5\u30fc\u30d0\u5074\u3067 VPN gateway \u3078\u306e ping \u3092 \u30c1\u30a7\u30c3\u30af\u3057\u3066\u3001\u63a5\u7d9a\u6642\u306b\u7ba1\u7406\u8005\u306b\u30e1\u30fc\u30eb\u304c\u5c4a\u304f\u3088\u3046\u306b\u3057\u3066\u3044\u305f\u3051\u3069\u3001 \u65b0\u3057\u3044\u30eb\u30fc\u30bf\u3067\u3082\u540c\u69d8\u306e\u3053\u3068\u3092\u3084\u308a\u305f\u3044\u3002 <\/p>\n<blockquote><p><small> \u30d1\u30b9\u30ef\u30fc\u30c9\u3082\u305d\u308c\u306a\u308a\u306b\u9577\u3044\u6841\u306b\u3057\u3066\u3044\u308b\u3057\u3001L2TP \u306e PSK \u65b9\u5f0f\u3067\u3001 \u4e8b\u524d\u5171\u6709\u30ad\u30fc\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u5408\u308f\u305b\u3066\u6f0f\u308c\u306a\u3051\u308c\u3070\u3001VPN \u306b\u63a5\u7d9a\u3067\u304d\u306a\u3044\u306e\u3067\u3001 \u5341\u5206\u5b89\u5168&#8230;.\u3002 \u3068\u306f\u3044\u3048\u3001\u3082\u3057\u7834\u3089\u308c\u305f\u3089&#8230;\u306e\u3053\u3068\u3092\u8003\u3048\u3001L2TP \u306e\u5229\u7528\u306e\u969b\u306b\u81ea\u5206\u5b9b\u306e \u30e1\u30fc\u30eb\u304c\u6765\u308b\u3088\u3046\u306b\u3057\u3066\u3042\u308c\u3070\u3001\u898b\u899a\u3048\u306e\u306a\u3044\u63a5\u7d9a=\u4fb5\u5165\u3055\u308c\u305f&#8230;\u3067\u767a\u898b\u3067\u304d\u308b\u3002 <\/small><\/p><\/blockquote>\n<p> EdgeRouter-X \u3067\u30e1\u30fc\u30eb\u3092\u51fa\u3059\u3063\u3066\u3001\u304b\u306a\u308a\u3044\u3058\u3089\u306a\u3044\u3068\u30c0\u30e1\u304b\u3068\u304a\u3082\u3063\u305f\u3051\u3069\u3001 ssmtp \u3068\u3044\u3046\u30bd\u30d5\u30c8\u304c\u5165\u3063\u3066\u3044\u305f\u306e\u3067\u3001\u610f\u5916\u3068\u7c21\u5358\u3002 <\/p>\n<pre>\n(( \/etc\/ssmtp\/ssmtp.conf ))\nroot=postmaster\nmailhub=\u81ea\u5b85\u306e\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\nrewriteDomain=\u81ea\u5b85\u306e\u30c9\u30e1\u30a4\u30f3\u540d\nhostname=\u30eb\u30fc\u30bf\u306e\u30db\u30b9\u30c8\u540d\n<\/pre>\n<p> \u307e\u305a\u306f\u3001\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u308c\u308b\u3088\u3046\u306b\u3001ssmtp \u306e\u8a2d\u5b9a\u3002 <\/p>\n<pre>\n(( \/etc\/ppp\/ip-up.d\/l2tpd ))\n#!\/bin\/sh\n# $1 Interface name  ppp0\n# $2 The tty         ttyS1\n# $3 The link speed  38400\n# $4 Local IP number 12.34.56.78\n# $5 Peer  IP number 12.34.56.99\n# $6 Optional ``ipparam&apos;&apos; value  foo\nSSMTP=&quot;\/usr\/sbin\/ssmtp&quot;\nIFACE=$1\ntest -x $SSMTP || exit 0\ncase &quot;$IFACE&quot; in\nl2tp* )\necho -e &quot;From: root@tsaitoh.net\\n\nSubject: [ERX] interface $IFACE is UP.\\n\\n\nIP address: $4 &lt;=&gt; $5\\nOption: $6\\n&quot; \\\n| $SSMTP foo@example.com\n;;\nesac\n<\/pre>\n<p> \u6700\u521d\u3001\/etc\/network\/if-up.d\/l2tp \u3067\u51e6\u7406\u3092\u66f8\u3044\u305f\u3051\u3069\u3001\u30c0\u30e1\u3067\u3061\u3087\u3044\u3068\u60a9\u3093\u3060\u3002 <\/p>\n","protected":false},"excerpt":{"rendered":"<p>EdgeRouter-X \u304c\u5c4a\u304f\u524d\u306f\u3001linux \u30b5\u30fc\u30d0\u5074\u3067 VPN gateway \u3078\u306e ping \u3092 \u30c1\u30a7\u30c3\u30af\u3057\u3066\u3001\u63a5\u7d9a\u6642\u306b\u7ba1\u7406\u8005\u306b\u30e1\u30fc\u30eb\u304c\u5c4a\u304f\u3088\u3046\u306b\u3057\u3066\u3044\u305f\u3051\u3069\u3001 \u65b0\u3057\u3044\u30eb\u30fc\u30bf\u3067\u3082\u540c\u69d8\u306e\u3053\u3068\u3092\u3084\u308a\u305f\u3044\u3002 \u30d1\u30b9\u30ef\u30fc\u30c9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,29],"tags":[],"class_list":["post-3020","post","type-post","status-publish","format-standard","hentry","category-linux","category-network"],"_links":{"self":[{"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/posts\/3020","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/comments?post=3020"}],"version-history":[{"count":0,"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/posts\/3020\/revisions"}],"wp:attachment":[{"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/media?parent=3020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/categories?post=3020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tsaitoh.net\/wp\/wp-json\/wp\/v2\/tags?post=3020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}