雄也の?日坊主日記

2004|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|
2006|05|
2007|04|05|09|10|11|
2008|04|05|08|10|11|

2008-10-28

_ [software] OpenVPNの--script-security level

APTでopenvpnパッケージを2.1~rc11-1に上げるとそのままではVPN接続ができなかったが,設定を追加することで解決することができた.

/var/log/syslogを確認すると以下のログが吐かれていた.

...
Oct 28 22:41:57 yoshiyuki ovpn-<host>[15998]: openvpn_execve: external program may not be called due to setting of --script-security level
Oct 28 22:41:57 yoshiyuki ovpn-<host>[15998]: script failed: external program fork failed
Oct 28 22:41:57 yoshiyuki ovpn-<host>[15998]: Exiting
...

/usr/share/doc/openvpn/NEWS.Debian.gzを確認すると,2.1~rc9-3からデフォルトは組み込みコマンドのみを許可していて,外部プログラムの起動の場合はscript-securityを2に設定するようになったらしい.

By default (script-security 1) it will only allow the execution of
built-in commands (ip, ifconfig, route,...). If you require the execution
of external commands, such as /etc/openvpn/update-resolv-conf, you'll have
to include the following option in your configuration file:
script-security 2

自分はVPN接続時に/etc/openvpn/<host>.upを,切断時に/etc/openvpn/<host>.downを実行するようにしている(外部プログラム起動). そのため,/etc/openvpn/<host>.confに以下を追加することで接続できるようになった.

script-security 2
お名前:
E-mail:
コメント:
[]

Debian | LOOX T70HN | Linux | Rails | Rast | Ruby | TYPE T VGN-TZ90HS | boat | hardware | music | p | snowboard | software | surfing | tDiary | その他 | ボウリング | 映画 | 家族 | 会社 | 管理 | 丸藤 | 高専 | 散歩 | 仕事 | 自分 |

"Yuya.Nishida." / 西田 雄也 <yuya at j96 dot org>