<html dir="ltr"><head></head><body style="text-align:left; direction:ltr;"><div>Hi Paul,</div><div><br></div><div>Thanks for the response,</div><div><br></div><div>The IPSEC connection is up running and routing. The ping tests are done to a private 10 network behind the IPSEC termination point so the only path to this network is via a tunnel. </div><div>Doing a tcpdump on the outbound interface on the client shows a mix of IPSEC and ICMP packeting during the ping tests which initially confused me but appears to be normal.</div><div>I suspect that I need to work on the packets from a postrouting perspective as the incoming packets aren't visible. I suspect that firewalld is more of a machine based firewall rather than a firewall proper, so my expectations may be a little high.</div><div><br></div><div>On the bright side, I now have clients machines joining a private freeipa kerberos domain via an ipsec tunnel. Now to see if I can make home directories automount via NFS which may require solving the NAT issues and I should be mostly done.</div><div><br></div><div>Regards Ian</div><div><br></div><div><br></div><div>-----Original Message-----</div><div><b>From</b>: Paul Wouters <<a href="mailto:Paul%20Wouters%20%3cpaul@nohats.ca%3e">paul@nohats.ca</a>></div><div><b>To</b>: Ian Willis <<a href="mailto:Ian%20Willis%20%3cian@checksum.net.au%3e">ian@checksum.net.au</a>></div><div><b>Cc</b>: <a href="mailto:swan@lists.libreswan.org">swan@lists.libreswan.org</a></div><div><b>Subject</b>: Re: [Swan]  Firewalld libreswan centos8</div><div><b>Date</b>: Mon, 30 Dec 2019 20:57:26 -0500 (EST)</div><div><br></div><pre>On Tue, 24 Dec 2019, Ian Willis wrote:</pre><pre><br></pre><pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></pre><pre>While it's not really a libreswan issue I thought that someone here might be able to assist.</pre><pre><br></pre><pre>With a datacentre network of 10.10.10.0/20 and a libreswan ipsec allocated network of ( 10.200.200.16- 10.200.200.64) ie 10.200.200.0/24 I</pre><pre>want traffic to allow traffic to be able to route between the networks. I don't want to use NAT and I would like to use the firewall.</pre><pre>The reason for not wanting NAT is that when services are consumed the source IP address is logged which is associated with an end user.</pre><pre><br></pre><pre>I can ping between the hosts, so routing appears to be correct.</pre><pre>Everything routes correctly when I stop firewalld.</pre><pre></pre><pre><br></pre><pre>If firewalld is running, does the IPsec tunnel establish? If not, then</pre><pre>you need to allow IPsec using:</pre><pre><br></pre><pre>firewall-cmd --add-service=ipsec --permanent</pre><pre>firewall-cmd --reload</pre><pre><br></pre><pre>this will ensure that IKE and IPsec packets are accepted.</pre><pre><br></pre><pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></pre><pre>I had thought that this would be pretty simple with something like the following</pre><pre><br></pre><pre>firewall-cmd --zone=work --add-rich-rule='rule family="ipv4"   source address="10.200.200.0/24" destination address="10.10.10.0/20"</pre><pre>protocol value="tcp" log level="warning" accept'</pre><pre><br></pre><pre>However the traffic was dropped still being dropped by the firewall.</pre><pre><br></pre><pre>I then throught that a direct rule might help.</pre><pre><br></pre><pre>Something like</pre><pre><br></pre><pre>firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -i ens3 -o ens7 -p tcp  --dport 53 -m state --state NEW,RELATED,ESTABLI</pre><pre>SHED -j ACCEPT</pre><pre><br></pre><pre>However that didn't work either.</pre><pre></pre><pre><br></pre><pre>I'm unfortunately also not that familiar with firewalld to help you further.</pre><pre><br></pre><pre>Paul</pre><pre><br></pre></body></html>