Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:services:vpn:pptp:server [2020/10/16 15:43] – [VPN service] description vgaetera | docs:guide-user:services:vpn:pptp:server [2023/03/14 13:32] – consolidate variable naming vgaetera | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== PPTP server ====== | ====== PPTP server ====== | ||
| - | {{section> | + | {{section> |
| ===== Introduction ===== | ===== Introduction ===== | ||
| * This how-to describes the method for setting up [[wp> | * This how-to describes the method for setting up [[wp> | ||
| - | * Follow [[docs: | + | * Follow [[docs: |
| - | * Follow [[docs: | + | |
| ===== Goals ===== | ===== Goals ===== | ||
| - | {{section> | + | {{section> |
| - | ===== Instructions | + | ===== Command-line instructions |
| ==== 1. Preparation ==== | ==== 1. Preparation ==== | ||
| - | Set up [[docs: | + | Install the required |
| - | Install the packages | + | Specify |
| <code bash> | <code bash> | ||
| Line 21: | Line 20: | ||
| # Configuration parameters | # Configuration parameters | ||
| - | PPTP_USER="PPTP_USERNAME" | + | VPN_POOL="192.168.6.128-254" |
| - | PPTP_PASS="PPTP_PASSWORD" | + | VPN_USER="USERNAME" |
| - | PPTP_POOL="192.168.7.2-255" | + | VPN_PASS="PASSWORD" |
| </ | </ | ||
| ==== 2. Firewall ==== | ==== 2. Firewall ==== | ||
| - | Consider VPN network as private | + | Enable conntrack helper to allow related GRE traffic. |
| + | Consider VPN network as private. | ||
| + | Assign | ||
| Allow access to VPN server from WAN zone. | Allow access to VPN server from WAN zone. | ||
| <code bash> | <code bash> | ||
| + | # Configure kernel parameters | ||
| + | cat << EOF >> / | ||
| + | net.netfilter.nf_conntrack_helper=1 | ||
| + | EOF | ||
| + | / | ||
| + | |||
| # Configure firewall | # Configure firewall | ||
| uci rename firewall.@zone[0]=" | uci rename firewall.@zone[0]=" | ||
| uci rename firewall.@zone[1]=" | uci rename firewall.@zone[1]=" | ||
| - | uci rename firewall.@forwarding[0]=" | ||
| uci del_list firewall.lan.device=" | uci del_list firewall.lan.device=" | ||
| uci add_list firewall.lan.device=" | uci add_list firewall.lan.device=" | ||
| Line 44: | Line 50: | ||
| uci set firewall.pptp.proto=" | uci set firewall.pptp.proto=" | ||
| uci set firewall.pptp.target=" | uci set firewall.pptp.target=" | ||
| - | uci -q delete firewall.gre | ||
| - | uci set firewall.gre=" | ||
| - | uci set firewall.gre.name=" | ||
| - | uci set firewall.gre.src=" | ||
| - | uci set firewall.gre.proto=" | ||
| - | uci set firewall.gre.target=" | ||
| uci commit firewall | uci commit firewall | ||
| / | / | ||
| </ | </ | ||
| - | ==== VPN service ==== | + | ==== 3. VPN service ==== |
| Configure VPN service. | Configure VPN service. | ||
| <code bash> | <code bash> | ||
| # Configure VPN service | # Configure VPN service | ||
| + | uci set pptpd.pptpd.enabled=" | ||
| uci set pptpd.pptpd.logwtmp=" | uci set pptpd.pptpd.logwtmp=" | ||
| - | uci set pptpd.pptpd.localip=" | + | uci set pptpd.pptpd.localip=" |
| - | uci set pptpd.pptpd.remoteip=" | + | uci set pptpd.pptpd.remoteip=" |
| - | uci rename | + | uci -q delete |
| - | uci set pptpd.login.username=" | + | uci set pptpd.client=" |
| - | uci set pptpd.login.password=" | + | uci set pptpd.client.username=" |
| + | uci set pptpd.client.password=" | ||
| uci commit pptpd | uci commit pptpd | ||
| / | / | ||
| Line 70: | Line 72: | ||
| ===== Testing ===== | ===== Testing ===== | ||
| - | {{section> | + | {{section> |
| ===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
| Line 85: | Line 87: | ||
| pgrep -f -a pptpd | pgrep -f -a pptpd | ||
| ip address show; ip route show table all | ip address show; ip route show table all | ||
| - | ip rule show; ip -6 rule show; iptables-save; | + | ip rule show; ip -6 rule show; nft list ruleset |
| + | sysctl net.netfilter.nf_conntrack_helper | ||
| # Persistent configuration | # Persistent configuration | ||
| uci show network; uci show firewall; uci show pptpd | uci show network; uci show firewall; uci show pptpd | ||
| - | sysctl | + | grep -v -e " |
| </ | </ | ||