Tomato with PPTP and PPPoE

I just wanted to setup my Tomato-Firmware to provide a PPTP-based VPN. Naturally I used the HOWTO, but sadly I ran into a problem where Google couldn't help. The log only showed

pppd[8449]: unrecognized option 'local'

But my config did not contain "local"! After I'd already given up and tried without PPTP, I stumbled over a post that made the problem obvious, although it did not offer a solution. The problem seems to be, that my router has to use PPPoE and therefore already has a config in /tmp/ppp which is then used for the VPN-connects. No wonder that didn't work.

It seems that the path is hardwired into the pppd-binary. So the only solution I came up with, was to copy and modify the binary. Dirty of course, but at least working :-/

So here is what I did:
cp /usr/sbin/pppd /opt/sbin/
# be careful: the replacement has to be exactly 3 chars!
sed -i -e 's#/tmp/ppp/#/tmp/xxx/#' /opt/sbin/pppd
cat > /opt/etc/config/vpn.wanup <<EOF
#!/bin/sh
if [ ! -f /tmp/xxx/chap-secrets ]; then
mkdir -p /tmp/xxx
ln -s /opt/etc/ppp/chap-secrets /tmp/xxx
fi
/opt/etc/init.d/S20poptop restart
EOF
/opt/etc/config/vpn.wanup
# now edit /opt/etc/pptpd.conf
# and set "ppp /opt/sbin/pppd"
/opt/etc/init.d/S20poptop restart

I hope that's all. Good luck!

Comments

  • Thanks, that did the trick! :D
  • Thanks a lot!!
  • Thanks a lot mate! It really did a trick!

    Dmitry