<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hey Andy,<br>
    <br>
    maybe this helps a bit. I tried something similar, I tried to
    establish a "group"-system based on my certificates. So here my
    server-config:<br>
    <br>
    conn group1<br>
            left=192.168.0.200<br>
            leftcert=vpnserver.crt<br>
            leftsubnet=192.168.5.0/24<br>
            leftid=vpnserver.of.our.company.fqdn<br>
            leftfirewall=yes<br>
            right=%any<br>
            rightid="DC=de, DC=company, O=Companyname, OU=group1
    certificate, CN=*"<br>
            rightsourceip=10.0.50.0/24<br>
            auto=add<br>
    <br>
    conn group2<br>
            left=192.168.0.200<br>
            leftcert=vpnserver.crt<br>
            leftsubnet=192.168.5.0/24,192.168.3.0/24<br>
            leftid=vpnserver.of.our.company.fqdn<br>
            leftfirewall=yes<br>
            right=%any<br>
            rightid="DC=de, DC=company, O=Companyname, OU=group2
    certificate, CN=*"<br>
            rightsourceip=10.0.0.0/24<br>
            auto=add<br>
    <br>
    So now generating different certificates with right ids should bring
    you in the correct subnet.<br>
    Further, by chosing a rightsourceip you can configure your firewall
    to accept connections to some hosts depending on <br>
    senders address. In config I have different rightsourceips
    defined...<br>
    <br>
    Your firewallsettings can be edited or configured. The defaut script
    for that is tha updown-script of strongswan. On debian<br>
    wheezy I could find it in /usr/libexec/ipsec/_updown<br>
    <br>
    Hope this helps. <br>
    Kind regards<br>
    Uli<br>
    <br>
    <br>
    Am 05.06.2013 10:36, schrieb Paton, Andy:
    <blockquote
cite="mid:A497F4B20D522940AE83F7646D17929435BB2E59@G4W3301.americas.hpqcorp.net"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"HP Simplified";
        panose-1:2 11 6 4 2 2 4 2 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"HP Simplified Light";
        panose-1:2 11 4 4 2 2 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"HP Simplified Light","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"
style="margin-bottom:12.0pt;line-height:13.5pt;background:white;vertical-align:baseline"><span
style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">I
            am trying to design a unified VPN gateway - by unified i
            mean one VPN headend, which can handle connections to
            multiple backends. I have a VM with a number of NiC's
            attached:<o:p></o:p></span></p>
        <p class="MsoNormal"
style="margin-bottom:12.0pt;line-height:13.5pt;background:white;vertical-align:baseline"><span
style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">eth0
            - Front Facing IP of Headend 10.1.0.2/30 eth1 - Backend
            Resource grouup A 172.18.81.137/24 eth2 - Backend Resource
            group B 162.18.81.137/24<o:p></o:p></span></p>
        <p class="MsoNormal"
style="margin-bottom:12.0pt;line-height:13.5pt;background:white;vertical-align:baseline"><span
style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">So
            the intention is to configure the VPN connection to inspect
            a device/user certificate (x509) and route to the backend
            resource according to an ACL.<o:p></o:p></span></p>
        <p class="MsoNormal"
style="margin-bottom:12.0pt;line-height:13.5pt;background:white;vertical-align:baseline"><span
style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">So
            for example -<o:p></o:p></span></p>
        <p class="MsoNormal"
style="margin-bottom:12.0pt;line-height:13.5pt;background:white;vertical-align:baseline"><span
style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">Joe
            Bloggs is permitted to access resources on both backend A
            & B. Mickey Mouse is permitted to access only resources
            on backend B.<o:p></o:p></span></p>
        <p class="MsoNormal"
style="margin-bottom:12.0pt;line-height:13.5pt;background:white;vertical-align:baseline"><span
style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">Joe
            Bloggs establishes VPN connection to the headend, and
            attempts to connect to a resource: 172.17.81.142 for
            example, on resource group A. Based on the Joe's certificate
            he should be routed accordingly for this request.<o:p></o:p></span></p>
        <p class="MsoNormal"
style="margin-bottom:12.0pt;line-height:13.5pt;background:white;vertical-align:baseline"><span
style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">If
            Mickey mouse attempts to access the same resource, because
            the certificate doesn't permit access - then Strongswan
            should block access to this IP address.<o:p></o:p></span></p>
        <p class="MsoNormal"
style="margin-bottom:12.0pt;line-height:13.5pt;background:white;vertical-align:baseline"><span
style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">How
            might i go about configuring strongswan to do this?<o:p></o:p></span></p>
        <p class="MsoNormal"
style="margin-bottom:12.0pt;line-height:13.5pt;background:white;vertical-align:baseline"><span
style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">Current
            config looks like this - for dropping resources onto a
            single subnet:<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">#
            /etc/ipsec.conf - strongSwan IPsec configuration file<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE"><o:p> </o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">config
            setup<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">       
            crlcheckinterval=180<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            strictcrlpolicy=no<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            plutostart=no<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE"><o:p> </o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">conn
            %default<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            ikelifetime=60m<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            keylife=20m<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            rekeymargin=3m<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            keyingtries=1<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            ike=aes256-sha256-modp1024!<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            esp=aes256-sha256-modp1024!<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE"><o:p> </o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">conn rw<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            #left=10.1.0.2<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            leftcert=supermanCert.der<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            leftid="CN=EN, O=JusticeLeague, CN=Metropolis"<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            leftsubnet=172.17.81.137/27<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            leftfirewall=yes<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            right=%any<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            rightsourceip=10.3.100.0/24<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            rightid=%any<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            keyexchange=ikev2<o:p></o:p></span></p>
        <p class="MsoNormal"
          style="line-height:13.5pt;background:#EEEEEE;vertical-align:baseline">
          <span
            style="font-size:10.5pt;font-family:Consolas;color:black;border:none
            windowtext 1.0pt;padding:0cm;background:#EEEEEE">   
            auto=add</span><span
            style="font-size:10.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"HP Simplified
            Light","sans-serif""><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"HP Simplified
            Light","sans-serif""><o:p> </o:p></span></p>
        <p class="MsoNormal"><b><span
              style="font-size:9.0pt;font-family:"HP
              Simplified","sans-serif";color:black">Andy
              Paton<br>
            </span></b><span style="font-size:9.0pt;font-family:"HP
            Simplified","sans-serif";color:#717172">Business
            Development Solution Architect<br>
            HP Enterprise Services</span><span style="color:#0F243E"><o:p></o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.strongswan.org">Users@lists.strongswan.org</a>
<a class="moz-txt-link-freetext" href="https://lists.strongswan.org/mailman/listinfo/users">https://lists.strongswan.org/mailman/listinfo/users</a></pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Ulrich Schinz
 

<a class="moz-txt-link-abbreviated" href="mailto:ulrich.schinz@ksfh.de">ulrich.schinz@ksfh.de</a>

___________________________________________

 

Katholische Stiftungsfachhochschule München

Abteilung Benediktbeuern

Don Bosco Str. 1

83671 Benediktbeuern

Telefon +49 8857 88 506

<a class="moz-txt-link-abbreviated" href="http://www.ksfh.de">www.ksfh.de</a>

 

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

 

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
</pre>
  </body>
</html>