{"id":676,"date":"2020-03-19T17:29:48","date_gmt":"2020-03-19T17:29:48","guid":{"rendered":"https:\/\/server-help.org\/?p=676"},"modified":"2020-03-19T17:30:44","modified_gmt":"2020-03-19T17:30:44","slug":"linux-vpn-server","status":"publish","type":"post","link":"https:\/\/server-help.org\/index.php\/2020\/03\/19\/linux-vpn-server\/","title":{"rendered":"Linux VPN Server"},"content":{"rendered":"\n<p>In this guide we will setup a PPTP VPN Server on a CentOS 7 Linux server and connect from a Windows pc.<\/p>\n\n\n\n<p>1). Open TCP port 1723 and allow GRE in your firewall<\/p>\n\n\n\n<p>2). Login to the server with SSH.<\/p>\n\n\n\n<p>3). yum -y install epel-release<\/p>\n\n\n\n<p>4). yum -y install ppp pptpd net-tools iptables-services<\/p>\n\n\n\n<p>5). mv \/etc\/pptpd.conf \/etc\/pptpd.conf.bkp<\/p>\n\n\n\n<p>6). mv -f \/etc\/ppp\/options.pptpd \/etc\/ppp\/options.pptpd.bkp<\/p>\n\n\n\n<p>7).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo 'name pptpd\nrefuse-pap\nrefuse-chap\nrefuse-mschap\nrequire-mschap-v2\nrequire-mppe-128\nproxyarp\nlock\nnobsdcomp\nnovj\nnovjccomp\nnologfd\nms-dns 8.8.8.8\nms-dns 8.8.4.4' > \/etc\/ppp\/options.pptpd<\/code><\/pre>\n\n\n\n<p>8).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo 'option \/etc\/ppp\/options.pptpd\nlogwtmp\nlocalip 10.0.10.1\nremoteip 10.0.10.2-254' > \/etc\/pptpd.conf<\/code><\/pre>\n\n\n\n<p>9). echo net.ipv4.ip_forward = 1 >> \/etc\/sysctl.conf<\/p>\n\n\n\n<p>10). <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl stop firewalld.service\n\nsystemctl disable firewalld.service\n\nservice iptables save\n\nservice iptables stop\n\nchkconfig iptables off\n\niptables -F\n\nchmod +x \/etc\/rc.d\/rc.local<\/code><\/pre>\n\n\n\n<p>11).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"iptables -t nat -A POSTROUTING -o ens192 -j MASQUERADE\" >> \/etc\/rc.d\/rc.local\n\niptables -t nat -A POSTROUTING -o ens192 -j MASQUERADE\n\necho \"iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu\" >> \/etc\/rc.d\/rc.local\n\niptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu\n\niptables-save<\/code><\/pre>\n\n\n\n<p>12). vi \/etc\/ppp\/chap-secrets<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Secrets for authentication using CHAP\n# client        server  secret                  IP addresses\nmyuser pptpd mypassword *<\/code><\/pre>\n\n\n\n<p>Make sure to replace myuser and mypassword with the username and password you want to use to connect.<\/p>\n\n\n\n<p>13). service pptpd restart<\/p>\n\n\n\n<p>14). systemctl enable pptpd<\/p>\n\n\n\n<p>Now your PPTP Linux VPN Server has been configured.<\/p>\n\n\n\n<p>You can now login with your Username and Password you configured earlier.<\/p>\n\n\n\n<p>If you have issues you may need to restart your Server.<\/p>\n\n\n\n<p>To setup your Windows VPN client please reference the guide linked below starting at Step 20:<\/p>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-server-knowledge-base\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"2KgAQQYV6j\"><a href=\"https:\/\/server-help.org\/index.php\/2020\/03\/19\/windows-vpn-server\/\">Windows VPN Server<\/a><\/blockquote><iframe title=\"&#8220;Windows VPN Server&#8221; &#8212; Server Knowledge Base\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/server-help.org\/index.php\/2020\/03\/19\/windows-vpn-server\/embed\/#?secret=2KgAQQYV6j\" data-secret=\"2KgAQQYV6j\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In this guide we will setup a PPTP VPN Server on a CentOS 7 Linux server and connect from a Windows pc. 1). Open TCP port 1723 and allow GRE in your firewall 2). Login to the server with SSH. 3). yum -y install epel-release 4). yum -y install ppp pptpd net-tools iptables-services 5). mv&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts\/676"}],"collection":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/comments?post=676"}],"version-history":[{"count":12,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts\/676\/revisions"}],"predecessor-version":[{"id":688,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts\/676\/revisions\/688"}],"wp:attachment":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/media?parent=676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/categories?post=676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/tags?post=676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}