Monday, June 25, 2007

PPTP on OpenWrt

PPTP Configuration

install pptpd (dep. ppp, kmod-crypto, kmod-mppe, kmod-ppp)

exit /etc/ppp/options.pptpd
Change the IP from 172.36.0.1 to your LAN IP of the router
and enable proxyarp

in /etc/ppp/chap-secrets
insert a line
username pptp-server password 192.168.xxx.xxx (IP Address of the client)

Add the following lines to /etc/firewall.user
### Allow PPTP control connections from WAN
iptables -t nat -A prerouting_wan -p tcp --dport 1723 -j ACCEPT
iptables -A input_wan -p tcp --dport 1723 -j ACCEPT
### Allow GRE protocol (used by PPTP data stream)
iptables -A output_rule -p 47 -j ACCEPT
iptables -A input_wan -p 47 -j ACCEPT

### VPN Section
# allow VPN clients to talk to LAN clients
iptables -A forwarding_rule -s 192.168.42.0/24 -d 192.168.42.0/24 -j ACCEPT
# allow VPN connections to get out WAN interface (to internet)
iptables -A forwarding_rule -i ppp+ -o vlan1 -j ACCEPT

and restart firewall

No comments: