[Openswan Users] Firewall rules for openswan behind NAT

Kevin Keane Subscription subscription at kkeane.com
Thu Nov 14 04:02:01 UTC 2013


In IPv4, ICMP is a "nice to have". Without it, you may be getting less informative error messages ("timeout" instead of "network unreachable" for instance).

In IPv6, ICMPv6 is absolutely essential; without it, clients can't even get an IP address or find their default gateway.

Kevin Keane

The NetTech

760-721-8339

http://www.4nettech.com

Our values: Privacy, Liberty, Justice

See https://www.4nettech.com/corp/the-nettech-values.html



-----Original message-----
From: Fred Weston <fred.weston at lpga.com>
Sent: Wednesday 13th November 2013 9:06
To: Leto <letoams at gmail.com>
Cc: users at lists.openswan.org
Subject: Re: [Openswan Users] Firewall rules for openswan behind NAT

Let me clarify – when I reference ports/protocols that I’m allowing inbound, I’m allowing it from the opposite host and not specifying a source port.

 
Is ICMP required for functionality or only for ease of troubleshooting?  Typically I only allow it if I need it for some reason.

 
Thanks,

FW

 
 
 
 
 
From: Leto [mailto:letoams at gmail.com]
Sent: Wednesday, November 13, 2013 11:27 AM
To: Fred Weston
Cc: users at lists.openswan.org
Subject: Re: [Openswan Users] Firewall rules for openswan behind NAT

 


sent from a tiny device 


On 2013-11-13, at 10:44, Fred Weston <fred.weston at lpga.com <mailto:fred.weston at lpga.com> > wrote:

Hello All,

 
I’m using OpenSwan with AWS to link two private VPC networks in different regions.

 
I’m having trouble getting my firewall ACLs right.  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.

 
One side has all traffic permitted inbound for the time being and I’m making ACL changes trying to restrict traffic to certain ports/protocols on the other side.

 
Both endpoints are behind 1:1 NAT.  Everything is permitted outbound on both sides.

 
>From reading online, I understand that the following ports and protocols should be all I need:

 
UDP 500

UDP 4500

IP Protocol 50

IP Protocol 51

 
I tried the above and had no luck.  As soon as I change from permitting all inbound to permitting only the above list the tunnel comes down.

 
You should really allow icmp.

 
Note that you need to accept from a random high port to dest udp 4500, not just 4500 <-> 4500. Same for 500

 
 



 
I also tried permitting tcp/1721 and tcp/1723 and IP Protocol 47.

 
I am using AWS ‘security groups’ to control filtering and according to the docs (and my observations) security groups are stateful, so I am not sure why this isn’t working. 

 
Can anyone offer any suggestions?

 
 
Thanks,

 
Fred Weston

 
 
 
 
 
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. 

_______________________________________________
Users at lists.openswan.org <mailto:Users at lists.openswan.org> 
https://lists.openswan.org/mailman/listinfo/users
Micropayments: https://flattr.com/thing/38387/IPsec-for-Linux-made-easy
Building and Integrating Virtual Private Networks with Openswan:
http://www.amazon.com/gp/product/1904811256/104-3099591-2946327?n=283155 <http://www.amazon.com/gp/product/1904811256/104-3099591-2946327?n=283155> 

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.

_______________________________________________

Users at lists.openswan.org

https://lists.openswan.org/mailman/listinfo/users

Micropayments: https://flattr.com/thing/38387/IPsec-for-Linux-made-easy

Building and Integrating Virtual Private Networks with Openswan:

http://www.amazon.com/gp/product/1904811256/104-3099591-2946327?n=283155



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openswan.org/pipermail/users/attachments/20131114/2dfa38b8/attachment-0001.html>


More information about the Users mailing list