<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Openswan on Evan Hoffman</title><link>https://evan.wtf/tags/openswan/</link><description>Recent content in Openswan on Evan Hoffman</description><generator>Hugo</generator><language>en-US</language><copyright>Evan Hoffman</copyright><lastBuildDate>Thu, 07 Aug 2014 13:16:19 +0000</lastBuildDate><atom:link href="https://evan.wtf/tags/openswan/index.xml" rel="self" type="application/rss+xml"/><item><title>Using OpenSWAN to connect two VPCs in different AWS regions</title><link>https://evan.wtf/2014/08/07/using-openswan-to-connect-two-vpcs-in-different-aws-regions/</link><pubDate>Thu, 07 Aug 2014 13:16:19 +0000</pubDate><guid>https://evan.wtf/2014/08/07/using-openswan-to-connect-two-vpcs-in-different-aws-regions/</guid><description>&lt;p&gt;Amazon has a pretty decent writeup on how to do this (&lt;a href="https://aws.amazon.com/articles/5472675506466066"&gt;here&lt;/a&gt;), but in trying to establish Postgres replication across regions, I found some weird behavior where I could connect to the port directly (telnet to 5432) but psql (or pg_basebackup) didn&amp;rsquo;t work. tcpdump showed this:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;16:11:28.419642 IP 10.121.11.47.35039 &amp;gt; 10.1.11.254.postgresql: Flags [P.], seq 9:234, ack 2, win 211, options [nop,nop,TS val 11065893 ecr 1811434], length 225&#10;16:11:28.419701 IP 10.121.11.47.35039 &amp;gt; 10.1.11.254.postgresql: Flags [P.], seq 9:234, ack 2, win 211, options [nop,nop,TS val 11065893 ecr 1811434], length 225&#10;16:11:28.421186 IP 10.1.11.254.postgresql &amp;gt; 10.121.11.47.35039: Flags [.], ack 234, win 219, options [nop,nop,TS val 1811520 ecr 11065893,nop,nop,sack 1 {9:234}], length 0&#10;16:11:28.425273 IP 10.1.11.254.postgresql &amp;gt; 10.121.11.47.35039: Flags [P.], seq 2:1377, ack 234, win 219, options [nop,nop,TS val 1811522 ecr 11065893], length 1375&#10;16:11:28.425291 IP 10.1.96.20 &amp;gt; 10.1.11.254: ICMP 10.121.11.47 unreachable - need to frag (mtu 1422), length 556&#10;16:11:28.697397 IP 10.1.11.254.postgresql &amp;gt; 10.121.11.47.35039: Flags [P.], seq 2:1377, ack 234, win 219, options [nop,nop,TS val 1811590 ecr 11065893], length 1375&#10;16:11:28.697438 IP 10.1.96.20 &amp;gt; 10.1.11.254: ICMP 10.121.11.47 unreachable - need to frag (mtu 1422), length 556&#10;16:11:29.241311 IP 10.1.11.254.postgresql &amp;gt; 10.121.11.47.35039: Flags [P.], seq 2:1377, ack 234, win 219, options [nop,nop,TS val 1811726 ecr 11065893], length 1375&#10;16:11:29.241356 IP 10.1.96.20 &amp;gt; 10.1.11.254: ICMP 10.121.11.47 unreachable - need to frag (mtu 1422), length 556&#10;16:11:30.333438 IP 10.1.11.254.postgresql &amp;gt; 10.121.11.47.35039: Flags [P.], seq 2:1377, ack 234, win 219, options [nop,nop,TS val 1811999 ecr 11065893], length 1375&#10;16:11:30.333488 IP 10.1.96.20 &amp;gt; 10.1.11.254: ICMP 10.121.11.47 unreachable - need to frag (mtu 1422), length 556&#10;16:11:32.513418 IP 10.1.11.254.postgresql &amp;gt; 10.121.11.47.35039: Flags [P.], seq 2:1377, ack 234, win 219, options [nop,nop,TS val 1812544 ecr 11065893], length 1375&#10;16:11:32.513467 IP 10.1.96.20 &amp;gt; 10.1.11.254: ICMP 10.121.11.47 unreachable - need to frag (mtu 1422), length 556&#10;16:11:36.881409 IP 10.1.11.254.postgresql &amp;gt; 10.121.11.47.35039: Flags [P.], seq 2:1377, ack 234, win 219, options [nop,nop,TS val 1813636 ecr 11065893], length 1375&#10;16:11:36.881460 IP 10.1.96.20 &amp;gt; 10.1.11.254: ICMP 10.121.11.47 unreachable - need to frag (mtu 1422), length 556&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After quite a bit of Google and mucking in network ACLs and security groups, the fix ended up being this:&lt;/p&gt;</description></item></channel></rss>