I have PPTP Server running on my OpenWrt router (v18.06.1). Finally, I have PPTP access from a cellular network to an internal network, but the subnet mask is 255.255.255.255 (instead of 255.255.255.0) so I can not access internal resources. And no, I can’t user OpenVPN or any other VPN because PPTP is the only supporter in my device.
Here is what I have done so far:
Install latest OpenWrt image
Install luci, pptpd, kmod-mppe, and kmod-nf-nathelper-extra
opkg update
opkg install luci pptpd kmod-mppe kmod-nf-nathelper-extra
[/etc/config/pptpd]
config service 'pptpd'
option 'enabled' '1'
option 'localip' '192.168.0.1'
option 'remoteip' '192.168.0.20-30'
config 'login'
option 'username' mydevice'
option 'password' 'devicepassword'
[/etc/config/firewall]
config rule
option target 'ACCEPT'
option _name 'pptp'
option src 'wan'
option proto 'tcp'
option dest_port '1723'
config rule
option target 'ACCEPT'
option _name 'gre'
option src 'wan'
option proto '47'
[/etc/firewall.user]
# Allow all traffic in and out of the ppp interface. No reason to specify nets.
iptables -A input_rule -i ppp+ -j ACCEPT
iptables -A output_rule -o ppp+ -j ACCEPT
# This rule will allow traffic towards internet
iptables -A forwarding_rule -i ppp+ -j ACCEPT
iptables -A forwarding_rule -o ppp+ -j ACCEPT
This all is enough to make PPTP Server/connection working but how I got 255.255.255.0 subnet instead of 255.255.255.255?