Home Forums OS X Server and Client Discussion Misc. Command line PPTP client

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #370734
    premiermac
    Participant

    Is there an easy way to invoke a PPTP connection that is already setup in Internet Connect from the CLI? I notice that when I do a ps after using Internet Connect to start a PPTP connection that I get a pppd line as such-

    pppd serviceid 7B2C0F87-8B80-4F66-9400-97D3D7546CC0 controlled

    But I can’t figure out a way to invoke this via CLI. The serviceid is identical each time I connect to that site, so it must be saved somewhere.

    I’d like to be able to SSH into a box and establish a PPTP connection out of it without it being logged in at the GUI.

    #370811
    jnetman1
    Participant

    sudo pppd serviceid 2 debug logfile /tmp/ppp.log plugin /System/Library/SystemConfiguration/PPPController.bundle/Contents/PlugIns/PPPDialogs.ppp plugin pptp.ppp remoteaddress AAA.BBB.CCC.DDD redialcount 1 redialtimer 5 idle 1800 mru 1500 mtu 1448 receive-all novj 0:0 noipdefault ipcp-accept-local ipcp-accept-remote user yourusername password yourpassword hide-password noaskpassword mppe-stateless mppe-128 looplocal

    AAA.BBB.CCC.DDD is the address of the PPTP server. Next you have to add a route. Do an ifconfig and look for the ppp0 interface. Should look something like this:

    ppp0: flags=8051 mtu 1396
    inet 172.18.247.53 –> 172.18.247.84 netmask 0xffff0000

    You need the remote IP for the route, which is the last one (172.18.247.84 in the example above.) Add route like so:

    sudo route add 172.18.247.0/24 172.18.247.84

    and you are done.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Comments are closed