<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ppp on CyberSpy</title>
    <link>https://cyberspy.io/tags/ppp/</link>
    <description>Recent content in Ppp on CyberSpy</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Wed, 20 Nov 2019 11:42:17 -0500</lastBuildDate>
    <atom:link href="https://cyberspy.io/tags/ppp/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>OS X VPN client pppd host route configuration on post-interface connection</title>
      <link>https://cyberspy.io/articles/pppdup/</link>
      <pubDate>Wed, 20 Nov 2019 11:42:17 -0500</pubDate>
      <guid>https://cyberspy.io/articles/pppdup/</guid>
      <description>&lt;h3 id=&#34;vpn-client-ppp-daemon-configuration&#34;&gt;VPN Client PPP daemon configuration&lt;/h3&gt;&#xA;&lt;p&gt;&lt;em&gt;Recipe&lt;/em&gt;: Configure Default Host routes after a specific VPN connection has been established&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Solution&lt;/em&gt;:&lt;/p&gt;&#xA;&lt;p&gt;In order to configure the host (or network routes, although I&amp;rsquo;m solely interested in routing specific hosts&#xA;between my two sites),  we need to create a file with the following commands in &lt;code&gt;/etc/ppp&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/bin/sh&#xA;&#xA;# VPN_GATEWAY is the remote address of the vpn tunnel&#xA;# when ppp executes this script it will pass several values to it&#xA;# $5 will hold the remote gateway&#xA;&#xA;VPN_GATEWAY=192.168.1.156&#xA;if [ &amp;#34;${5:-}&amp;#34; = &amp;#34;${VPN_GATEWAY}&amp;#34; ]&#xA;then&#xA;                /bin/echo &amp;#34;${5:-} routes added for interface ${5:-}&amp;#34; &amp;gt; &amp;#34;/tmp/pppd_ip_up_$$.log&amp;#34;&#xA;                /sbin/route add -host 192.168.1.92 -interface ppp0 || (/bin/echo &amp;#34;failed to add route 92&amp;#34; &amp;gt;&amp;gt; &amp;#34;/tmp/pppd_ip_up_$$.log&amp;#34;)&#xA;                /sbin/route add -host 192.168.1.158 -interface ppp0|| (/bin/echo &amp;#34;failed to add route 158&amp;#34; &amp;gt;&amp;gt; &amp;#34;/tmp/pppd_ip_up_$$.log&amp;#34;)&#xA;                /sbin/route add -host 192.168.1.56 -interface ppp0|| (/bin/echo &amp;#34;failed to add route 56&amp;#34; &amp;gt;&amp;gt; &amp;#34;/tmp/pppd_ip_up_$$.log&amp;#34;)&#xA;                /sbin/route add -host 192.168.1.26 -interface ppp0|| (/bin/echo &amp;#34;failed to add route 26&amp;#34; &amp;gt;&amp;gt; &amp;#34;/tmp/pppd_ip_up_$$.log&amp;#34;)&#xA;else&#xA;                /bin/echo &amp;#34;No routes added for interface ${5:-}&amp;#34; &amp;gt; &amp;#34;/tmp/pppd_ip_up_$$.log&amp;#34;&#xA;fi&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This script must be owned by root and executable. We can create multiple else clauses to configure routes for our remote VPN connection&#xA;based on the remote IP Address. I&amp;rsquo;ve added a log to &lt;code&gt;/tmp&lt;/code&gt; to monitor the process.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
