How to create site to site VPN for SMB with low IT budget. part1 How to setup OpenVPN server on debian? part2 How to create site to site vpn from pfsense to openvpn server.part3 OK, we already have Openvpn server at central office. Now our task is to configure branch office pfsenses (why pfsense) to connect central office Openvpn server: create Hyperv VM for pfsense at branch office 01: mount pfsense iso to the pfsense VM create fixed size virtual disk, 5gb is enough. if  <span><a href="https://www.itforce.mn/index.php/2017/07/22/how-to-create-site-to-site-vpn-from-pfsense-to-openvpn-server/" class="readmore">Continue reading &rarr;</a></span>{"id":839,"date":"2017-07-22T18:17:27","date_gmt":"2017-07-22T10:17:27","guid":{"rendered":"https:\/\/www.itforce.mn\/?p=839"},"modified":"2018-07-08T01:00:15","modified_gmt":"2018-07-07T17:00:15","slug":"how-to-create-site-to-site-vpn-from-pfsense-to-openvpn-server","status":"publish","type":"post","link":"https:\/\/www.itforce.mn\/index.php\/2017\/07\/22\/how-to-create-site-to-site-vpn-from-pfsense-to-openvpn-server\/","title":{"rendered":"How to create site to site vpn from pfsense to openvpn server.part3"},"content":{"rendered":"<ol>\n<li><a href=\"http:\/\/www.itforce.mn\/index.php\/2017\/07\/19\/how-to-create-site-to-site-vpn-for-smb-with-low-it-budget\/\">How to create site to site VPN for SMB with low IT budget. part1<\/a><\/li>\n<li><a href=\"http:\/\/www.itforce.mn\/index.php\/2017\/07\/22\/how-to-setup-openvpn-server-on-debian\/\">How to setup OpenVPN server on debian? part2<\/a><\/li>\n<li><a href=\"http:\/\/www.itforce.mn\/index.php\/2017\/07\/22\/how-to-create-site-to-site-vpn-from-pfsense-to-openvpn-server\/\">How to create site to site vpn from pfsense to openvpn server.part3<\/a><\/li>\n<\/ol>\n<p style=\"padding-left: 30px;\">OK, we already have Openvpn server at central office. Now our task is to configure branch office pfsenses (<a href=\"http:\/\/www.itforce.mn\/index.php\/2017\/07\/19\/how-to-create-site-to-site-vpn-for-smb-with-low-it-budget#pfsense\">why pfsense<\/a>) to connect central office Openvpn server:<\/p>\n<ol>\n<li>create Hyperv VM for pfsense at branch office 01:\n<ul>\n<li>mount pfsense iso to the pfsense VM<\/li>\n<li>create fixed size virtual disk, 5gb is enough. if you use dynamic disk &#8211; pfsense freebsd installer can fail<\/li>\n<li>before pfsense installation add second vNIC<\/li>\n<li>connect both vNICs to the same vswitch (based on one physical NIC) !<\/li>\n<\/ul>\n<\/li>\n<li>install pfsense on the VM<\/li>\n<li>during first booting choose en1 for WAN and en2 for LAN.<\/li>\n<li>Let&#8217;s consider that branch01 has 192.168.0.1 on tplink\/dlink\/Univsion-smartbox and so on router. Therefore assign 192.168.0.2 to WAN of pfsense and 172.16.101.1 to LAN interface.<\/li>\n<li>access to 172.16.101.1 from browser (before assign your workstation for example 172.16.101.100 ). Default credentials for pfsense is admin\/pfsense.<\/li>\n<li>copy content of ca.crt and ca.key from Debian openvpn server to pfsense (i recommend &#8211; instead of ftp\/winscp and so on, just from putty\/ssh &#8220;cat ca.key&#8221; and by mouse select\/copy content from screen &#8211; now just paste it into browser)<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-845\" src=\"http:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/00.jpg\" alt=\"\" width=\"988\" height=\"862\" srcset=\"https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/00.jpg 988w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/00-300x262.jpg 300w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/00-768x670.jpg 768w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/00-624x544.jpg 624w\" sizes=\"auto, (max-width: 988px) 100vw, 988px\" \/><\/li>\n<li>add into pfsense client01.key and client01.crt<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-846\" src=\"http:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/01.jpg\" alt=\"\" width=\"1191\" height=\"807\" srcset=\"https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/01.jpg 1191w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/01-300x203.jpg 300w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/01-768x520.jpg 768w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/01-1024x694.jpg 1024w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/01-624x423.jpg 624w\" sizes=\"auto, (max-width: 1191px) 100vw, 1191px\" \/><\/li>\n<li>configure openvpn client:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-847\" src=\"http:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/02.jpg\" alt=\"\" width=\"1255\" height=\"2973\" srcset=\"https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/02.jpg 1255w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/02-127x300.jpg 127w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/02-768x1819.jpg 768w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/02-432x1024.jpg 432w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/02-624x1478.jpg 624w\" sizes=\"auto, (max-width: 1255px) 100vw, 1255px\" \/><\/li>\n<li>enable optional interface:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-848\" src=\"http:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/03.jpg\" alt=\"\" width=\"1206\" height=\"960\" srcset=\"https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/03.jpg 1206w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/03-300x239.jpg 300w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/03-768x611.jpg 768w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/03-1024x815.jpg 1024w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/03-624x497.jpg 624w\" sizes=\"auto, (max-width: 1206px) 100vw, 1206px\" \/><\/li>\n<li>allow any traffic thru new OPT1 interface:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-849\" src=\"http:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/04.jpg\" alt=\"\" width=\"1247\" height=\"478\" srcset=\"https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/04.jpg 1247w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/04-300x115.jpg 300w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/04-768x294.jpg 768w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/04-1024x393.jpg 1024w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/04-624x239.jpg 624w\" sizes=\"auto, (max-width: 1247px) 100vw, 1247px\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-850\" src=\"http:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/05.jpg\" alt=\"\" width=\"1260\" height=\"509\" srcset=\"https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/05.jpg 1260w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/05-300x121.jpg 300w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/05-768x310.jpg 768w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/05-1024x414.jpg 1024w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/05-624x252.jpg 624w\" sizes=\"auto, (max-width: 1260px) 100vw, 1260px\" \/><\/li>\n<li>create routing to central office :<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1159\" src=\"http:\/\/www.itforce.mn\/wp-content\/uploads\/2018\/07\/routing.jpg\" alt=\"\" width=\"1012\" height=\"474\" srcset=\"https:\/\/www.itforce.mn\/wp-content\/uploads\/2018\/07\/routing.jpg 1012w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2018\/07\/routing-300x141.jpg 300w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2018\/07\/routing-768x360.jpg 768w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2018\/07\/routing-624x292.jpg 624w\" sizes=\"auto, (max-width: 1012px) 100vw, 1012px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1160\" src=\"http:\/\/www.itforce.mn\/wp-content\/uploads\/2018\/07\/routing2.jpg\" alt=\"\" width=\"1267\" height=\"560\" srcset=\"https:\/\/www.itforce.mn\/wp-content\/uploads\/2018\/07\/routing2.jpg 1267w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2018\/07\/routing2-300x133.jpg 300w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2018\/07\/routing2-768x339.jpg 768w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2018\/07\/routing2-1024x453.jpg 1024w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2018\/07\/routing2-624x276.jpg 624w\" sizes=\"auto, (max-width: 1267px) 100vw, 1267px\" \/><\/li>\n<li>to check state of vpn see from:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-851\" src=\"http:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/06.jpg\" alt=\"\" width=\"1242\" height=\"736\" srcset=\"https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/06.jpg 1242w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/06-300x178.jpg 300w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/06-768x455.jpg 768w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/06-1024x607.jpg 1024w, https:\/\/www.itforce.mn\/wp-content\/uploads\/2017\/07\/06-624x370.jpg 624w\" sizes=\"auto, (max-width: 1242px) 100vw, 1242px\" \/><\/li>\n<li>above pfsense configuration more or less equals to openvpn client conf file:\n<pre>client\r\nremote central.office.mn\r\ndev tun01\r\n\r\nifconfig 10.0.51.2 10.0.51.1\r\nroute 192.168.0.0 255.255.255.0\r\n\r\ntls-client\r\nca \/etc\/openvpn\/easy-rsa\/keys\/ca.crt\r\ncert \/etc\/openvpn\/easy-rsa\/keys\/client01.crt\r\nkey \/etc\/openvpn\/easy-rsa\/keys\/client01.key\r\nreneg-sec 60\r\nverb 5\r\nstatus \/var\/log\/openvpn.log\r\n#log-append \/var\/log\/openvpn01\r\n\r\nport 51191\r\nproto udp\r\nkeepalive 10 120\r\ncomp-lzo\r\ncipher AES-256-CBC\r\npersist-key\r\npersist-tun\r\n\r\n<\/pre>\n<\/li>\n<li>Result: each branch office device with configured dgw (for example 172.16.101.1) will ping central office subnet and vice versa<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":null,"protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,6,7],"tags":[],"class_list":["post-839","post","type-post","status-publish","format-standard","hentry","category-it-governance","category-smb","category-sysadmin-thoughts"],"_links":{"self":[{"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/posts\/839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/comments?post=839"}],"version-history":[{"count":34,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/posts\/839\/revisions"}],"predecessor-version":[{"id":1161,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/posts\/839\/revisions\/1161"}],"wp:attachment":[{"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/media?parent=839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/categories?post=839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/tags?post=839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}