<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-family: Arial,Helvetica,sans-serif'>
<p>Can you post the exact rules you are using?</p>
<p>Also have you tried forcing encapsulation with forceencaps=yes in your conns?</p>
<p>When you say "things stop working" does the tunnel come down, or does traffic just fail to pass?</p>
<p>Regards,</p>
<p>Nick</p>
<p>On 2013-11-17 17:13, Fred Weston wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div class="WordSection1">
<p class="MsoNormal"><span style="color: #1f497d;">Does anyone else have any suggestions?&nbsp; I would like to implement this in production but I am hesitant to do so when the only way I can get it to work is permit all traffic from the Internet into the openswan boxes.</span></p>
<p class="MsoNormal"><span style="color: #1f497d;">&nbsp;</span></p>
<div>
<div style="border: none; border-top: solid  #B5C4DF  1.0pt; padding: 3.0pt  0in  0in  0in;">
<p class="MsoNormal"><strong><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';">From:</span></strong><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';"> users-bounces@lists.openswan.org [mailto:users-bounces@lists.openswan.org] <strong>On Behalf Of </strong>Fred Weston<br /><strong>Sent:</strong> Wednesday, November 13, 2013 11:49 AM<br /><strong>To:</strong> Leto<br /><strong>Cc:</strong> users@lists.openswan.org<br /><strong>Subject:</strong> Re: [Openswan Users] Firewall rules for openswan behind NAT</span></p>
</div>
</div>
<p class="MsoNormal">&nbsp;</p>
<div>
<p class="MsoNormal"><span style="color: #1f497d;">Let me clarify &ndash; when I reference ports/protocols that I&rsquo;m allowing inbound, I&rsquo;m allowing it from the opposite host and not specifying a source port.</span></p>
<p class="MsoNormal"><span style="color: #1f497d;">&nbsp;</span></p>
<p class="MsoNormal"><span style="color: #1f497d;">Thanks,</span></p>
<p class="MsoNormal"><span style="color: #1f497d;">FW</span></p>
<p class="MsoNormal"><span style="color: #1f497d;">&nbsp;</span></p>
<p class="MsoNormal"><span style="color: #1f497d;">&nbsp;</span></p>
<p class="MsoNormal"><span style="color: #1f497d;">&nbsp;</span></p>
<p class="MsoNormal"><span style="color: #1f497d;">&nbsp;</span></p>
<p class="MsoNormal"><span style="color: #1f497d;">&nbsp;</span></p>
<div>
<div style="border: none; border-top: solid  #B5C4DF  1.0pt; padding: 3.0pt  0in  0in  0in;">
<p class="MsoNormal"><strong><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';">From:</span></strong><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';"> Leto [<a href="mailto:letoams@gmail.com">mailto:letoams@gmail.com</a>] <br /><strong>Sent:</strong> Wednesday, November 13, 2013 11:27 AM<br /><strong>To:</strong> Fred Weston<br /><strong>Cc:</strong> <a href="mailto:users@lists.openswan.org">users@lists.openswan.org</a><br /><strong>Subject:</strong> Re: [Openswan Users] Firewall rules for openswan behind NAT</span></p>
</div>
</div>
<p class="MsoNormal">&nbsp;</p>
<div>
<p class="MsoNormal"><br /><br /> sent from a tiny device&nbsp;</p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom: 12.0pt;"><br /> On 2013-11-13, at 10:44, Fred Weston &lt;<a href="mailto:fred.weston@lpga.com">fred.weston@lpga.com</a>&gt; wrote:</p>
</div>
<blockquote style="margin-top: 5.0pt; margin-bottom: 5.0pt;">
<div>
<div>
<p class="MsoNormal">Hello All,</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">I&rsquo;m using OpenSwan with AWS to link two private VPC networks in different regions.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">I&rsquo;m having trouble getting my firewall ACLs right.&nbsp; Everything works if I permit all traffic to the OpenSwan boxes, however when I try to get more restrictive and permit only the necessary ports things stop working.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">One side has all traffic permitted inbound for the time being and I&rsquo;m making ACL changes trying to restrict traffic to certain ports/protocols on the other side.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Both endpoints are behind 1:1 NAT.&nbsp; Everything is permitted outbound on both sides.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">From reading online, I understand that the following ports and protocols should be all I need:</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">UDP 500</p>
<p class="MsoNormal">UDP 4500</p>
<p class="MsoNormal">IP Protocol 50</p>
<p class="MsoNormal">IP Protocol 51</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">I tried the above and had no luck.&nbsp; As soon as I change from permitting all inbound to permitting only the above list the tunnel comes down.</p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><span style="font-size: 12.0pt; font-family: 'Times New Roman','serif';">&nbsp;</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 12.0pt; font-family: 'Times New Roman','serif';">You should really allow icmp.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 12.0pt; font-family: 'Times New Roman','serif';">&nbsp;</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 12.0pt; font-family: 'Times New Roman','serif';">Note that you need to accept from a random high port to dest udp 4500, not just 4500 &lt;-&gt; 4500. Same for 500</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 12.0pt; font-family: 'Times New Roman','serif';">&nbsp;</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 12.0pt; font-family: 'Times New Roman','serif';">&nbsp;</span></p>
</div>
<p class="MsoNormal" style="margin-bottom: 12.0pt;">&nbsp;</p>
<div>
<div>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">I also tried permitting tcp/1721 and tcp/1723 and IP Protocol 47.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">I am using AWS &lsquo;security groups&rsquo; to control filtering and according to the docs (and my observations) security groups are stateful, so I am not sure why this isn&rsquo;t working.&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Can anyone offer any suggestions?</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Thanks,</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><strong><span style="font-family: 'Verdana','sans-serif';">Fred Weston</span></strong></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
</div>
<p class="MsoNormal"><span style="font-size: 12.0pt; font-family: 'Times New Roman','serif';">The information transmitted in this message (including any attachments) is intended only for the use of the individual(s) and/or entity(ies) to which it is addressed and may contain confidential business information which should not be disclosed. If you are not the intended recipient, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this email in error, please notify the sender and immediately destroy and delete this email from your system without disseminating it. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message. Any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the LPGA and/or its affiliates. No employee is authorized to conclude any binding agreement on behalf of LPGA and/or its affiliates with another party by e-mail. All agreements shall be contained in a separate writing executed by an authorized LPGA signatory. Thank You. </span></p>
</div>
<blockquote style="margin-top: 5.0pt; margin-bottom: 5.0pt;">
<div>
<p class="MsoNormal"><span style="font-size: 12.0pt; font-family: 'Times New Roman','serif';">_______________________________________________<br /><a href="mailto:Users@lists.openswan.org">Users@lists.openswan.org</a><br /><a href="https://lists.openswan.org/mailman/listinfo/users">https://lists.openswan.org/mailman/listinfo/users</a><br /> Micropayments: <a href="https://flattr.com/thing/38387/IPsec-for-Linux-made-easy"> https://flattr.com/thing/38387/IPsec-for-Linux-made-easy</a><br /> Building and Integrating Virtual Private Networks with Openswan:<br /><a href="http://www.amazon.com/gp/product/1904811256/104-3099591-2946327?n=283155">http://www.amazon.com/gp/product/1904811256/104-3099591-2946327?n=283155</a></span></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><span style="font-size: 12.0pt; font-family: 'Times New Roman','serif';">The information transmitted in this message (including any attachments) is intended only for the use of the individual(s) and/or entity(ies) to which it is addressed and may contain confidential business information which should not be disclosed. If you are not the intended recipient, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this email in error, please notify the sender and immediately destroy and delete this email from your system without disseminating it. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message. Any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the LPGA and/or its affiliates. No employee is authorized to conclude any binding agreement on behalf of LPGA and/or its affiliates with another party by e-mail. All agreements shall be contained in a separate writing executed by an authorized LPGA signatory. Thank You. </span></p>
</div>
The information transmitted in this message (including any attachments) is intended only for the use of the individual(s) and/or entity(ies) to which it is addressed and may contain confidential business information which should not be disclosed. If you are not the intended recipient, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this email in error, please notify the sender and immediately destroy and delete this email from your system without disseminating it. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message. Any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the LPGA and/or its affiliates. No employee is authorized to conclude any binding agreement on behalf of LPGA and/or its affiliates with another party by e-mail. All agreements shall be contained in a separate writing executed by an authorized LPGA signatory. Thank You.<!-- html ignored --><br />
<pre>_______________________________________________
<a href="mailto:Users@lists.openswan.org">Users@lists.openswan.org</a>
<a href="https://lists.openswan.org/mailman/listinfo/users">https://lists.openswan.org/mailman/listinfo/users</a>
Micropayments: <a href="https://flattr.com/thing/38387/IPsec-for-Linux-made-easy">https://flattr.com/thing/38387/IPsec-for-Linux-made-easy</a>
Building and Integrating Virtual Private Networks with Openswan:
<a href="http://www.amazon.com/gp/product/1904811256/104-3099591-2946327?n=283155">http://www.amazon.com/gp/product/1904811256/104-3099591-2946327?n=283155</a>
</pre>
</blockquote>
</body></html>