<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
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:#954F72;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hi,</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have 3 interfaces:</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>WAN, where clients are connecting.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>LAN/10.11.0.0/16, this is network where clients get IP address.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>FILTER/eth2, where all clients traffic are routed here.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have 2 clients, client 1 IP 10.11.0.55 and client 2 IP 10.11.0.56.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Here are ip route and iptables rules.</p><p class=MsoNormal>ip rule add from 10.11.0.0/16 table FILTER</p><p class=MsoNormal>ip route add default dev eth2 table FILTER</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>When client 1 ping 8.8.8.8, I see the traffic go to eth2 interface.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>But when client 1 ping client 2, I don’t see the traffic go to eth2 interface. How do I force also local network 10.11.0.0/16 traffic to eth2 interface for filtering.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks,</p><p class=MsoNormal>Loc</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:noel.kuntze+strongswan-users-ml@thermi.consulting">Noel Kuntze</a><br><b>Sent: </b>Wednesday, November 29, 2017 10:56 AM<br><b>To: </b><a href="mailto:ncore@nic.fi">Loc Nguyen</a>; <a href="mailto:users@lists.strongswan.org">users@lists.strongswan.org</a><br><b>Subject: </b>Re: [strongSwan] Isolate clients and force local network traffic toan interface</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi,</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I can't tell what exactly you want. You can tell if traffic was protected with ipsec by using the iptables policy match module.</p><p class=MsoNormal>You can use a VTI[1], too.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Kind regards</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Noel</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>[1] https://wiki.strongswan.org/projects/strongswan/wiki/RouteBasedVPN</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On 28.11.2017 20:37, Loc Nguyen wrote:</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> Hi,</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> </p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> I create an IPsec network 10.11.0.0/16 and using dnsmasq to assign IP addresses.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> </p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> I able to route all 10.11.0.0/16 network traffic to an interface. I would like also route local network 10.11.0.0/16 between client to client to that interface too.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> </p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> I can use iptables FORWARD to block client to client. Instead of blocking I want the traffic to the interface.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> </p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> Thanks,</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>