特殊:Badtitle/NS100:OpenVPNdaemonMiniHowto
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/OpenVPNdaemonMiniHowto }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/af | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|Afrikaans| [[::OpenVPNdaemonMiniHowto/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/ar | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|العربية| [[::OpenVPNdaemonMiniHowto/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/az | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|azərbaycanca| [[::OpenVPNdaemonMiniHowto/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/bcc | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|جهلسری بلوچی| [[::OpenVPNdaemonMiniHowto/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/bg | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|български| [[::OpenVPNdaemonMiniHowto/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/br | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|brezhoneg| [[::OpenVPNdaemonMiniHowto/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/ca | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|català| [[::OpenVPNdaemonMiniHowto/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/cs | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|čeština| [[::OpenVPNdaemonMiniHowto/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/de | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|Deutsch| [[::OpenVPNdaemonMiniHowto/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/el | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|Ελληνικά| [[::OpenVPNdaemonMiniHowto/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/es | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|español| [[::OpenVPNdaemonMiniHowto/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/fa | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|فارسی| [[::OpenVPNdaemonMiniHowto/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/fi | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|suomi| [[::OpenVPNdaemonMiniHowto/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/fr | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|français| [[::OpenVPNdaemonMiniHowto/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/gu | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|ગુજરાતી| [[::OpenVPNdaemonMiniHowto/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/he | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|עברית| [[::OpenVPNdaemonMiniHowto/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/hu | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|magyar| [[::OpenVPNdaemonMiniHowto/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/id | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|Bahasa Indonesia| [[::OpenVPNdaemonMiniHowto/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/it | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|italiano| [[::OpenVPNdaemonMiniHowto/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/ja | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|日本語| [[::OpenVPNdaemonMiniHowto/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/ko | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|한국어| [[::OpenVPNdaemonMiniHowto/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/ksh | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|Ripoarisch| [[::OpenVPNdaemonMiniHowto/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/mr | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|मराठी| [[::OpenVPNdaemonMiniHowto/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/ms | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|Bahasa Melayu| [[::OpenVPNdaemonMiniHowto/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/nl | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|Nederlands| [[::OpenVPNdaemonMiniHowto/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/no | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|norsk| [[::OpenVPNdaemonMiniHowto/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/oc | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|occitan| [[::OpenVPNdaemonMiniHowto/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/pl | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|polski| [[::OpenVPNdaemonMiniHowto/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/pt | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|português| [[::OpenVPNdaemonMiniHowto/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/ro | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|română| [[::OpenVPNdaemonMiniHowto/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/ru | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|русский| [[::OpenVPNdaemonMiniHowto/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/si | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|සිංහල| [[::OpenVPNdaemonMiniHowto/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/sq | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|shqip| [[::OpenVPNdaemonMiniHowto/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/sr | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|српски / srpski| [[::OpenVPNdaemonMiniHowto/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/sv | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|svenska| [[::OpenVPNdaemonMiniHowto/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/th | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|ไทย| [[::OpenVPNdaemonMiniHowto/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/tr | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|Türkçe| [[::OpenVPNdaemonMiniHowto/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/vi | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|Tiếng Việt| [[::OpenVPNdaemonMiniHowto/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/yue | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|粵語| [[::OpenVPNdaemonMiniHowto/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/zh | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|中文| [[::OpenVPNdaemonMiniHowto/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/zh-hans | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|中文(简体)| [[::OpenVPNdaemonMiniHowto/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto | UbuntuHelp:OpenVPNdaemonMiniHowto | {{#if: | :}}OpenVPNdaemonMiniHowto}}/zh-hant | • {{#if: UbuntuHelp:OpenVPNdaemonMiniHowto|中文(繁體)| [[::OpenVPNdaemonMiniHowto/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:OpenVPNdaemonMiniHowto|:OpenVPNdaemonMiniHowto|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :OpenVPNdaemonMiniHowto/zh | | {{#ifexist: OpenVPNdaemonMiniHowto/zh | | {{#ifeq: {{#titleparts:OpenVPNdaemonMiniHowto|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:OpenVPNdaemonMiniHowto|1|-1|}} | zh | | }}
Introduction
Here we will configure openvpn client the following way:
- we will use the daemon(the init script)
- we will get an ip from the openvpn server and not from a dhcp server
run the following command:
sudo apt-get install openvpn resolvconf
create the /etc/openvpn/client.conf with the following config
remote 192.168.1.1<
>
client<
>
dev tap<
>
nobind<
>
tls-client<
>
ca /etc/openvpn/ca.crt<
>
cert /etc/openvpn/ubu.crt<
>
key /etc/openvpn/ubu.key<
>
pull<
>
verb 4<
>
remote-cert-tls server<
>
- auth-user-pass<
>
redirect-gateway<
>
- lladdr 00:FF:00:00:00:24<
> - route-delay 5<
>
up "/etc/openvpn/update-resolv-conf"<
>
down "/etc/openvpn/update-resolv-conf"<
>
replace 192.168.1.1 by your server's ip address, and replace ubu.crt,ubu.key and ca.crt by your own certificates
run the openvpn server to try:
/etc/init.d/openvpn start
then add it to the services that will be started at startup if you want:
update-rc.d foobar defaults