{"id":86,"date":"2011-02-09T15:03:34","date_gmt":"2011-02-09T15:03:34","guid":{"rendered":"http:\/\/gigihfordanama.wordpress.com\/?p=86"},"modified":"2012-08-08T00:15:34","modified_gmt":"2012-08-08T00:15:34","slug":"openvpn-with-freebsd-pf-and-windows-xp-as-client","status":"publish","type":"post","link":"https:\/\/dosen.unila.ac.id\/gigih\/2011\/02\/09\/openvpn-with-freebsd-pf-and-windows-xp-as-client\/","title":{"rendered":"OpenVPN with FreeBSD, PF and Windows XP as Client"},"content":{"rendered":"<p>Apa itu VPN :<\/p>\n<p>Menurut IETF, Internet Engineering Task Force, VPN is an emulation of [a] private Wide Area Network(WAN) using shared or public IP facilities, such as the Internet or private IP backbones.VPN merupakan suatu bentuk private internet yang melalui public network (internet), dengan menekankan pada keamanan data dan akses global melalui internet. Hubungan ini dibangun melalui suatu tunnel (terowongan) virtual antara 2 node.<\/p>\n<p>Access VPN memungkinkan pengguna untuk mengakses resource suatu network kapanpun dan dimanapun mereka berada. Access VPN mencakup jalur analog, ISDN, digital subcriber line (DSL), mobile IP dan berbagai teknologi kabel tersebut dapat dipisahkan menjadi tiga jenis, yaitu:<br \/>\n1. Client-Initiated,<br \/>\n2. Remote Router-Initiated,<br \/>\n3. Network Access Server (NAS)-Initiated.<br \/>\nJust That,&#8230;.. lets implemented our VPN server<!--more--><br \/>\nThis howto is a quick a dirty guide to building OpenVPN on a FreeBSD box (running pf as the firewall), and then connecting a Windows XP client to it.<\/p>\n<p>1. #cd \/usr\/ports\/security\/openvpn<br \/>\n2. #make config<br \/>\n3. #make build<br \/>\n4. #make install clean<\/p>\n<p>And Then just modified your rc.conf file\u00a0 on \/etc\/rc.conf<\/p>\n<p>openvpn_enable=&#8221;YES&#8221;<br \/>\nNow we going to create the config files, which we will place in \/usr\/local\/etc\/openvpn<\/p>\n<p>#mkdir \/usr\/local\/etc\/openvpn<br \/>\n#cd\u00a0 \/usr\/local\/etc\/openvpn<\/p>\n<p>#vi\u00a0 openvpn.conf<\/p>\n<p>Add This config to your openvpn.conf<br \/>\n***************** &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; *********************<br \/>\n# Specify device<br \/>\ndev tun<br \/>\n# Server dan client IP Pool<br \/>\nserver 10.8.0.0 255.255.255.0<br \/>\nifconfig-pool-persist ipp.txt<\/p>\n<p># Certificates untuk VPN Authentication<br \/>\nca \/usr\/local\/etc\/openvpn\/keys\/ca.crt<br \/>\ncert \/usr\/local\/etc\/openvpn\/keys\/server.crt<br \/>\nkey \/usr\/local\/etc\/openvpn\/keys\/server.key<br \/>\ndh \/usr\/local\/etc\/openvpn\/keys\/dh1024.pem<\/p>\n<p># Routes untuk client<br \/>\npush &#8220;route 192.168.0.0 255.255.255.0&#8243;<\/p>\n<p># compression VPN link<br \/>\ncomp-lzo<\/p>\n<p>#keepalive 10 60<br \/>\nping-timer-rem<br \/>\npersist-tun<br \/>\npersist-key<\/p>\n<p># Run OpenVPN sebagai daemon dan drop privileges ke user\/group nobody user nobody<br \/>\ngroup nobody<br \/>\ndaemon<br \/>\n***************** &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; *********************<\/p>\n<p>OK Beres,<br \/>\nSekarang tinggal bikin Certificate caranya<br \/>\n#cp -r \/usr\/local\/share\/doc\/openvpn\/easy-rsa ~gigih\/<br \/>\n#cd ~gigih\/easyrsa<\/p>\n<p>Modif dikit file vars<br \/>\n#vi vars<\/p>\n<p>1. export KEY_COUNTRY=ID<br \/>\n2. export KEY_PROVINCE=&#8221;LAMPUNG&#8221;<br \/>\n3. export KEY_CITY=LAMPUNG<br \/>\n4. export KEY_ORG=&#8221;VPN-SERV&#8221;<br \/>\n5. export KEY_EMAIL=&#8221; \/\/ &lt;![CDATA[<\/p>\n<p>var prefix = &#039;&#109;a&#039; + &#039;i&#108;&#039; + &#039;&#116;o&#039;;<br \/>\nvar path = &#039;hr&#039; + &#039;ef&#039; + &#039;=&#039;;<br \/>\nvar addy50153 = &#039;&#097;dm&#105;n_k&#097;tr&#111;&#039; + &#039;&#064;&#039;;<br \/>\naddy50153 = addy50153 + &#039;&#117;n&#105;l&#097;&#039; + &#039;&#046;&#039; + &#039;&#097;c&#039; + &#039;&#046;&#039; + &#039;&#105;d&#039;;<br \/>\ndocument.write( &#039;<a>&#8216; );<br \/>\ndocument.write( addy50153 );<br \/>\ndocument.write( &#8221; );<br \/>\n\/\/ ]]&gt;<a href=\"mailto:admin_katro@unila.ac.id\">admin_katro@unila.ac.id<\/a><br \/>\nThis email address is being protected from spam bots, you need Javascript enabled to view it<br \/>\n&#8221;<\/p>\n<p>untuk create sertificate via easy-rsa, mesti pake set mode bourne shell, just type<\/p>\n<p># sh<\/p>\n<p>And Then we&#8217;ll going to generate certificate &amp; Key for server<\/p>\n<p># . vars<br \/>\nNOTE: when you run .\/clean-all, I will be doing a rm -rf on \/usr\/home\/gigih\/easy-rsa\/keys<br \/>\n# .\/clean-all<br \/>\n# .\/build-ca<br \/>\nGenerating a 1024 bit RSA private key<br \/>\n. &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;++++++<br \/>\n. &#8230;&#8230;&#8230;&#8230;..++++++<br \/>\n. writing new private key to &#8216;ca.key&#8217;<br \/>\n. &#8212;&#8211;<br \/>\nYou are about to be asked to enter information that will be incorporated<br \/>\ninto your certificate request.<br \/>\nWhat you are about to enter is what is called a Distinguished Name or a DN.<br \/>\nThere are quite a few fields but you can leave some blank<br \/>\nFor some fields there will be a default value,<br \/>\nIf you enter &#8216;.&#8217;, the field will be left blank.<br \/>\n&#8212;&#8211;<br \/>\nCountry Name (2 letter code) [ID]:<br \/>\nState or Province Name (full name) [LAMPUNG]:<br \/>\nLocality Name (eg, city) [LAMPUNG]:<br \/>\nOrganization Name (eg, company) [VPN-SERV]:<br \/>\nOrganizational Unit Name (eg, section) []:<br \/>\nCommon Name (eg, your name or your server&#8217;s hostname) []:<br \/>\nEmail Address [ \/\/ &lt;![CDATA[<\/p>\n<p>var prefix = &#039;&#109;a&#039; + &#039;i&#108;&#039; + &#039;&#116;o&#039;;<br \/>\nvar path = &#039;hr&#039; + &#039;ef&#039; + &#039;=&#039;;<br \/>\nvar addy50153 = &#039;&#097;dm&#105;n_k&#097;tr&#111;&#039; + &#039;&#064;&#039;;<br \/>\naddy50153 = addy50153 + &#039;&#117;n&#105;l&#097;&#039; + &#039;&#046;&#039; + &#039;&#097;c&#039; + &#039;&#046;&#039; + &#039;&#105;d&#039;;<br \/>\ndocument.write( &#039;<a>&#8216; );<br \/>\ndocument.write( addy50153 );<br \/>\ndocument.write( &#8221; );<br \/>\n\/\/ ]]&gt;<a href=\"mailto:admin_katro@unila.ac.id\">admin_katro@unila.ac.id<\/a><br \/>\nThis email address is being protected from spam bots, you need Javascript enabled to view it<br \/>\n]:<\/p>\n<p>Jika dah beres tinggal generate aja key server dengan mengikuti langkah berikut<\/p>\n<p># .\/build-key-server server<br \/>\nGenerating a 1024 bit RSA private key<br \/>\n. &#8230;&#8230;&#8230;.++++++<br \/>\n. &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..++++++<br \/>\nwriting new private key to &#8216;server.key&#8217;<br \/>\n&#8212;&#8211;<br \/>\nYou are about to be asked to enter information that will be incorporated<br \/>\ninto your certificate request.<br \/>\nWhat you are about to enter is what is called a Distinguished Name or a DN.<br \/>\nThere are quite a few fields but you can leave some blank<br \/>\nFor some fields there will be a default value,<br \/>\nIf you enter &#8216;.&#8217;, the field will be left blank.<br \/>\n&#8212;&#8211;<br \/>\nCountry Name (2 letter code) [ID]:<br \/>\nState or Province Name (full name) [LAMPUNG]:<br \/>\nLocality Name (eg, city) [LAMPUNG]:<br \/>\nOrganization Name (eg, company) [VPN-SERV]:<br \/>\nOrganizational Unit Name (eg, section) []:<br \/>\nCommon Name (eg, your name or your server&#8217;s hostname) []:SERVER\u00a0\u00a0 &#8211;&gt;&gt;&gt;&gt; Bagian yang Penting<br \/>\nEmail Address [ \/\/ &lt;![CDATA[<\/p>\n<p>var prefix = &#039;&#109;a&#039; + &#039;i&#108;&#039; + &#039;&#116;o&#039;;<br \/>\nvar path = &#039;hr&#039; + &#039;ef&#039; + &#039;=&#039;;<br \/>\nvar addy50153 = &#039;&#097;dm&#105;n_k&#097;tr&#111;&#039; + &#039;&#064;&#039;;<br \/>\naddy50153 = addy50153 + &#039;&#117;n&#105;l&#097;&#039; + &#039;&#046;&#039; + &#039;&#097;c&#039; + &#039;&#046;&#039; + &#039;&#105;d&#039;;<br \/>\ndocument.write( &#039;<a>&#8216; );<br \/>\ndocument.write( addy50153 );<br \/>\ndocument.write( &#8221; );<br \/>\n\/\/ ]]&gt;<a href=\"mailto:admin_katro@unila.ac.id\">admin_katro@unila.ac.id<\/a><br \/>\nThis email address is being protected from spam bots, you need Javascript enabled to view it<br \/>\n]:<\/p>\n<p>Please enter the following &#8216;extra&#8217; attributes<br \/>\nto be sent with your certificate request<br \/>\nA challenge password []:1234567<br \/>\nAn optional company name []:LAMPUNG<br \/>\nUsing configuration from \/usr\/home\/gigih\/easy-rsa\/openssl.cnf<br \/>\nCheck that the request matches the signature<br \/>\nSignature ok<br \/>\nThe Subject&#8217;s Distinguished Name is as follows<br \/>\ncountryName\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 :PRINTABLE:&#8217;ID&#8217;<br \/>\nstateOrProvinceName\u00a0\u00a0 :PRINTABLE:&#8217;LAMPUNG&#8217;<br \/>\nlocalityName\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 :PRINTABLE:&#8217;LAMPUNG&#8217;<br \/>\norganizationName\u00a0\u00a0\u00a0\u00a0\u00a0 :PRINTABLE:&#8217;VPN-SERVER&#8217;<br \/>\ncommonName\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 :PRINTABLE:&#8217;SERVER&#8217;<br \/>\nemailAddress\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 :IA5STRING:&#8217; \/\/ &lt;![CDATA[<\/p>\n<p>var prefix = &#039;&#109;a&#039; + &#039;i&#108;&#039; + &#039;&#116;o&#039;;<br \/>\nvar path = &#039;hr&#039; + &#039;ef&#039; + &#039;=&#039;;<br \/>\nvar addy50153 = &#039;&#097;dm&#105;n_k&#097;tr&#111;&#039; + &#039;&#064;&#039;;<br \/>\naddy50153 = addy50153 + &#039;&#117;n&#105;l&#097;&#039; + &#039;&#046;&#039; + &#039;&#097;c&#039; + &#039;&#046;&#039; + &#039;&#105;d&#039;;<br \/>\ndocument.write( &#039;<a>&#8216; );<br \/>\ndocument.write( addy50153 );<br \/>\ndocument.write( &#8221; );<br \/>\n\/\/ ]]&gt;<a href=\"mailto:admin_katro@unila.ac.id\">admin_katro@unila.ac.id<\/a><br \/>\nThis email address is being protected from spam bots, you need Javascript enabled to view it<br \/>\n@unila.ac.id&#8217;<br \/>\nCertificate is to be certified until Jun 26 10:04:29 2011 GMT (3650 days)<br \/>\nSign the certificate? [y\/n]:y<br \/>\n.<br \/>\n1 out of 1 certificate requests certified, commit? [y\/n]y<br \/>\nWrite out database with 1 new entries<br \/>\nData Base Updated<\/p>\n<p>Yups beres dah generate key buat server<\/p>\n<p>Sekarang kita mo buat key untuk client<\/p>\n<p># .\/build-key client1<br \/>\nGenerating a 1024 bit RSA private key<br \/>\n. &#8230;&#8230;&#8230;++++++<br \/>\n. &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;++++++<br \/>\nwriting new private key to &#8216;client1.key&#8217;<br \/>\n&#8212;&#8211;<br \/>\nYou are about to be asked to enter information that will be incorporated<br \/>\ninto your certificate request.<br \/>\nWhat you are about to enter is what is called a Distinguished Name or a DN.<br \/>\nThere are quite a few fields but you can leave some blank<br \/>\nFor some fields there will be a default value,<br \/>\nIf you enter &#8216;.&#8217;, the field will be left blank.<br \/>\n&#8212;&#8211;<br \/>\nCountry Name (2 letter code) [ID]:<br \/>\nState or Province Name (full name) [LAMPUNG]:<br \/>\nLocality Name (eg, city) [LAMPUNG]:<br \/>\nOrganization Name (eg, company) [VPN-SERV]:<br \/>\nOrganizational Unit Name (eg, section) []:<br \/>\nCommon Name (eg, your name or your server&#8217;s hostname) []:CLIENT1<br \/>\nEmail Address [ \/\/ &lt;![CDATA[<\/p>\n<p>var prefix = &#039;&#109;a&#039; + &#039;i&#108;&#039; + &#039;&#116;o&#039;;<br \/>\nvar path = &#039;hr&#039; + &#039;ef&#039; + &#039;=&#039;;<br \/>\nvar addy50153 = &#039;&#097;dm&#105;n_k&#097;tr&#111;&#039; + &#039;&#064;&#039;;<br \/>\naddy50153 = addy50153 + &#039;&#117;n&#105;l&#097;&#039; + &#039;&#046;&#039; + &#039;&#097;c&#039; + &#039;&#046;&#039; + &#039;&#105;d&#039;;<br \/>\ndocument.write( &#039;<a>&#8216; );<br \/>\ndocument.write( addy50153 );<br \/>\ndocument.write( &#8221; );<br \/>\n\/\/ ]]&gt;<a href=\"mailto:admin_katro@unila.ac.id\">admin_katro@unila.ac.id<\/a><br \/>\nThis email address is being protected from spam bots, you need Javascript enabled to view it<br \/>\n]:<\/p>\n<p>Please enter the following &#8216;extra&#8217; attributes<br \/>\nto be sent with your certificate request<br \/>\nA challenge password []:123456<br \/>\nAn optional company name []:LAMPUNG<br \/>\nUsing configuration from \/usr\/home\/gigih\/easy-rsa\/openssl.cnf<br \/>\nDEBUG[load_index]: unique_subject = &#8220;yes&#8221;<br \/>\nCheck that the request matches the signature<br \/>\nSignature ok<br \/>\nThe Subject&#8217;s Distinguished Name is as follows<br \/>\ncountryName\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 :PRINTABLE:&#8217;ID&#8217;<br \/>\nstateOrProvinceName\u00a0\u00a0 :PRINTABLE:LAMPUNG<br \/>\nlocalityName\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 :PRINTABLE:&#8217;LAMPUNG&#8217;<br \/>\norganizationName\u00a0\u00a0\u00a0\u00a0\u00a0 :PRINTABLE:&#8217;VPN-SERV&#8217;<br \/>\ncommonName\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 :PRINTABLE:&#8217;CLIENT1&#8242;<br \/>\nemailAddress\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 :IA5STRING:&#8217; \/\/ &lt;![CDATA[<\/p>\n<p>var prefix = &#039;&#109;a&#039; + &#039;i&#108;&#039; + &#039;&#116;o&#039;;<br \/>\nvar path = &#039;hr&#039; + &#039;ef&#039; + &#039;=&#039;;<br \/>\nvar addy50153 = &#039;&#097;dm&#105;n_k&#097;tr&#111;&#039; + &#039;&#064;&#039;;<br \/>\naddy50153 = addy50153 + &#039;&#117;n&#105;l&#097;&#039; + &#039;&#046;&#039; + &#039;&#097;c&#039; + &#039;&#046;&#039; + &#039;&#105;d&#039;;<br \/>\ndocument.write( &#039;<a>&#8216; );<br \/>\ndocument.write( addy50153 );<br \/>\ndocument.write( &#8221; );<br \/>\n\/\/ ]]&gt;<a href=\"mailto:admin_katro@unila.ac.id\">admin_katro@unila.ac.id<\/a><br \/>\nThis email address is being protected from spam bots, you need Javascript enabled to view it<br \/>\n&#8216;<br \/>\nCertificate is to be certified until Jun 26 10:10:43 2017 GMT (3650 days)<br \/>\nSign the certificate? [y\/n]:y<\/p>\n<p>1 out of 1 certificate requests certified, commit? [y\/n]y<br \/>\nWrite out database with 1 new entries<br \/>\nData Base Updated<\/p>\n<p>Kalo mo Create key untuk client 2,\u00a0 3 dan seterusnya sama aja dengan langkah create client1<br \/>\nyang mesti diingat tinggal ubah Common Name nya<\/p>\n<p>Common Name (eg, your name or your server&#8217;s hostname) []:CLIENT1<br \/>\nmenjadi<br \/>\nCommon Name (eg, your name or your server&#8217;s hostname) []:CLIENT2<\/p>\n<p>sekarang tinggal generate dh, 1024 bit<\/p>\n<p># .\/build-dh<br \/>\nGenerating DH parameters, 1024 bit long safe prime, generator 2<br \/>\nThis is going to take a long time<br \/>\n. &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;<\/p>\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+..+&#8230;&#8230;&#8230;.<\/p>\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;..<\/p>\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;..+&#8230;..<\/p>\n<p>&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.++*++*++*<\/p>\n<p># .\/build-dh Generating DH parameters, 1024 bit long safe prime, generator 2 This is going to take a long time &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<\/p>\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+..+&#8230;&#8230;&#8230;&#8230;&#8230;..<\/p>\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;..<\/p>\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;..<\/p>\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..++*++*++*<\/p>\n<p>sip dah beres, urusannya dengan key dan sercificate, tinggal kopiin key yang sudah digenerate tadi ke folder openvpn<\/p>\n<p>#cp -R keys \/usr\/local\/etc\/openvpn\/<\/p>\n<p>Tapi sebelumnya elu kudu musti modif dikit file syslog.conf<\/p>\n<p>#vi \/etc\/syslog.conf<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;**********&#8212;&#8212;&#8212;-<\/p>\n<p>!openvpn<br \/>\n.* \/var\/log\/openvpn.log<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;**********&#8212;&#8212;&#8212;-<\/p>\n<p>#touch \/var\/log\/openvpn.log<br \/>\n#killall -HUP syslogd<\/p>\n<p>Jangan lupa mesti meload interface tun agar bisa digunakan si daemon openvpn, just type<\/p>\n<p>#kldload if_tun<\/p>\n<p>#kldload if_tap<\/p>\n<p>NOTE: error kldload: can\u2019t load if_tun, just Ignore &#8230;&#8230; \ud83d\ude42<\/p>\n<p>1. if_tap_load=&#8221;YES&#8221;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Ethernet tunnel software network interface<br \/>\n2. if_tun_load=&#8221;YES&#8221;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Tunnel driver (user process ppp)<\/p>\n<p>Terakhir tinggal jalankan daemon openVPN<\/p>\n<p>#\/usr\/local\/etc\/rc.d\/openvpn start<\/p>\n<p>coba cek file \/var\/log\/messages\u00a0 pastikan daemon openvpn telah berjalan<\/p>\n<p>Aug\u00a0 9 17:57:32 gateway openvpn[38670]: OpenVPN 2.0.5 i386-portbld-freebsd6.1 [SSL] [LZO] built on Aug\u00a0 9 2007<br \/>\nAug\u00a0 9 17:57:32 gateway openvpn[38670]: IMPORTANT: OpenVPN&#8217;s default port number is now 1194, based on an official port number assignment by IANA.\u00a0 OpenVPN 2.0-beta16 and earlier used 5000 as the default port.<br \/>\nAug\u00a0 9 17:57:32 gateway openvpn[38670]: WARNING: &#8211;keepalive option is missing from server config<br \/>\nAug\u00a0 9 17:57:32 gateway openvpn[38670]: gw 222.124.196.100<br \/>\nAug\u00a0 9 17:57:32 gateway openvpn[38670]: TUN\/TAP device \/dev\/tun0 opened<br \/>\nAug\u00a0 9 17:57:32 gateway openvpn[38670]: \/sbin\/ifconfig tun0 10.8.0.1 10.8.0.2 mtu 1500 netmask 255.255.255.255 up<br \/>\nAug\u00a0 9 17:57:32 gateway openvpn[38675]: GID set to nobody<br \/>\nAug\u00a0 9 17:57:32 gateway openvpn[38675]: UDPv4 link local (bound): [undef]:1194<br \/>\nAug\u00a0 9 17:57:32 gateway openvpn[38675]: UDPv4 link remote: [undef]<br \/>\nAug\u00a0 9 17:57:32 gateway openvpn[38675]: Initialization Sequence Completed<\/p>\n<p># ifconfig<br \/>\npflog0: flags=141&lt;UP,RUNNING,PROMISC&gt; mtu 33208<br \/>\npfsync0: flags=0&lt;&gt; mtu 2020<br \/>\ntun0: flags=8051&lt;UP,POINTOPOINT,RUNNING,MULTICAST&gt; mtu 1500<br \/>\ninet6 fe80::20e:cff:fe3e:2ccd%tun0 prefixlen 64 scopeid 0x7<br \/>\ninet 10.8.0.1 &#8211;&gt; 10.8.0.2 netmask 0xffffffff<br \/>\nOpened by PID 38670<br \/>\n#<\/p>\n<p>Yups berarti openvpnnya dah jalan<br \/>\nKarena saya pake PF (Packet Filter) sebagai firewallnya, tinggal ubah sedikit konfigurasi pada fle pf.conf<\/p>\n<p># \/etc\/pf.conf<br \/>\n# Maintained by Gigih.<br \/>\n#<br \/>\n# Rev 1.0 Feb 04 2006<br \/>\n# Please, please, please confirm any changes<br \/>\n# on this file to me.<br \/>\n#<\/p>\n<p>eIF = &#8220;xl0&#8221;<br \/>\niIF = &#8220;em0&#8221;<br \/>\ndIF = &#8220;rl0&#8243;<br \/>\nvpn_if=&#8221;tun0&#8243;<\/p>\n<p># VPN Network<br \/>\nvpn_network=&#8221;10.8.0.0\/24&#8221;\u00a0\u00a0 &#8212;&gt;&gt; terserah mo netwrok berapa ajah<\/p>\n<p># NAT VPN connections<br \/>\nnat on $eIF from $vpn_network to any -&gt; ($eIF)\u00a0\u00a0 -&gt; artinya paket dari interface vpn akan di NAT langsung sebagai IP eksternal<\/p>\n<p># VPN connections inbound<br \/>\npass in on $ext_if proto udp from any to port 1194 keep state<br \/>\npass quick on $vpn_if<\/p>\n<p>Jangan sampe kebalik-balik\u00a0 yah&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<br \/>\nDone,\u00a0 server VPN anda udah UP<\/p>\n<p>Gimana mo nyobainnya,,\u00a0 Gampang&#8230;&#8230;&#8230;&#8230;&#8230;<br \/>\nUntuk windows 2000 dan XP dah ada software VPN yang gratis, tinggal donlod disini<\/p>\n<p>http:\/\/www.openvpn.se<\/p>\n<p>Langsung aja install di PC client<br \/>\nBy default akan terinstall di direktori<\/p>\n<p>C:Program FilesOpenvpn<\/p>\n<p>sekarang langsung aja kopi file key yang sudah kita generate di server tadi,<br \/>\nfilenya adalah ca.crt, client1.crt, client1.key,\u00a0 gw biasanya pindahin via ftp<br \/>\nkopiiin ke direktori\u00a0 C:Program FilesOpenvpnconfig<\/p>\n<p>Selanjutnya masuk ke C:Program FilesOpenvpnconfig\u00a0 dan bikin config openvpnnya<br \/>\nkasihnamafilenya myopenvpn.ovpn<br \/>\nisinya kira-kira begini<\/p>\n<p>&#8212;&#8212;&#8212;-snip&#8212;&#8212;&#8212;&#8211;<br \/>\nclient<br \/>\nremote my.openvpn.server 1194<br \/>\ndev tun<br \/>\ncomp-lzo<\/p>\n<p>ca ca.crt<br \/>\ncert client1.crt<br \/>\nkey client1.key<\/p>\n<p># Set log file verbosity.<br \/>\nverb 3<br \/>\n&#8212;&#8212;&#8212;-snip&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>Jika sudah\u00a0 logo icon openvpn akan nongol di pojok kanan bawah windows,<br \/>\ntinggal klik kanan dan konek&#8230;&#8230;<\/p>\n<p>JIka logo berwarna ijo\u00a0 berarti anda sudah terhubung dengan server,<br \/>\nCOngratulationssss&#8230;..<\/p>\n<p>bisa tes dengan mengetikkan<\/p>\n<p>ipconfig \/all<br \/>\npada command promp<\/p>\n<p>C:Documents and SettingsAdministrator&gt;ipconfig \/all<\/p>\n<p>Windows IP Configuration<\/p>\n<p>Host Name . . . . . . . . . . . . : gigih-banget<br \/>\nPrimary Dns Suffix\u00a0 . . . . . . . :<br \/>\nNode Type . . . . . . . . . . . . : Unknown<br \/>\nIP Routing Enabled. . . . . . . . : No<br \/>\nWINS Proxy Enabled. . . . . . . . : No<br \/>\nDNS Suffix Search List. . . . . . : unila.ac.id<\/p>\n<p>Ethernet adapter Local Area Connection:<\/p>\n<p>Connection-specific DNS Suffix\u00a0 . : unila.ac.id<br \/>\nDescription . . . . . . . . . . . : Realtek RTL8169\/8110 Family Gigabit<br \/>\nEthernet NIC<br \/>\nPhysical Address. . . . . . . . . : 00-18-F3-7E-BF-65<br \/>\nDhcp Enabled. . . . . . . . . . . : No<br \/>\nIP Address. . . . . . . . . . . . : 192.168.1.204<br \/>\nSubnet Mask . . . . . . . . . . . : 255.255.255.0<br \/>\nDefault Gateway . . . . . . . . . : 192.168.1.245<br \/>\nDNS Servers . . . . . . . . . . . : 192.168.1.3<\/p>\n<p>Ethernet adapter Local Area Connection 3:<\/p>\n<p>Connection-specific DNS Suffix\u00a0 . :<br \/>\nDescription . . . . . . . . . . . : TAP-Win32 Adapter V8<br \/>\nPhysical Address. . . . . . . . . : 00-FF-49-04-3A-D7<br \/>\nDhcp Enabled. . . . . . . . . . . : Yes<br \/>\nAutoconfiguration Enabled . . . . : Yes<br \/>\nIP Address. . . . . . . . . . . . : 10.8.0.6<br \/>\nSubnet Mask . . . . . . . . . . . : 255.255.255.252<br \/>\nDefault Gateway . . . . . . . . . :<br \/>\nDHCP Server . . . . . . . . . . . : 10.8.0.5<br \/>\nLease Obtained. . . . . . . . . . : Thursday, August 09, 2007 5:52:32 PM<\/p>\n<p>Lease Expires . . . . . . . . . . : Friday, August 08, 2008 5:52:32 PM<\/p>\n<p>C:Documents and SettingsAdministrator&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apa itu VPN : Menurut IETF, Internet Engineering Task Force, VPN is an emulation of [a] private Wide Area Network(WAN) using shared or public IP facilities, such as the Internet or private IP backbones.VPN merupakan suatu bentuk private internet yang melalui public network (internet), dengan menekankan pada keamanan data dan akses global melalui internet. Hubungan &hellip; <a href=\"https:\/\/dosen.unila.ac.id\/gigih\/2011\/02\/09\/openvpn-with-freebsd-pf-and-windows-xp-as-client\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;OpenVPN with FreeBSD, PF and Windows XP as Client&#8221;<\/span><\/a><\/p>\n","protected":false},"author":25,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1348,5],"tags":[],"class_list":["post-86","post","type-post","status-publish","format-standard","hentry","category-kiat-sukses-menjadi-seorang-network-engineer-2","category-old-post-dari-unilanet"],"_links":{"self":[{"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/posts\/86"}],"collection":[{"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/comments?post=86"}],"version-history":[{"count":0,"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/posts\/86\/revisions"}],"wp:attachment":[{"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/media?parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/categories?post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/tags?post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}