<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">I followed your suggestions without much luck.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">

Adding the kerberos keytab didn't change anything, when I try login through the UI it just redirects me again with the same notice:</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><span style="font-family:'Liberation Sans',Arial,Sans,sans-serif;font-size:11px;background-color:rgb(249,249,249)">Your session has expired. Please re-login.</span><br>

</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><span style="font-family:'Liberation Sans',Arial,Sans,sans-serif;font-size:11px;background-color:rgb(249,249,249)"><br></span></div><div class="gmail_default">

<span style="font-family:tahoma,sans-serif">However if I login with the incorrect details logs will show </span><font face="tahoma, sans-serif">INFO: 401 Unauthorized: kinit: Client '<a href="mailto:asd@DOMAIN.COM">asd@DOMAIN.COM</a>' not found in Kerberos database while getting initial credentials and the UI will give me an error message.<br>

</font></div><div><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">It seems when it's logged in with the correct credentials it's still finding itself lost. I have a feeling I'm overlooking something so simple..<br>

</div><div class="gmail_extra"><br clear="all"><div><font face="tahoma, sans-serif">Andrew</font><br></div>
<br><br><div class="gmail_quote">On Wed, Aug 14, 2013 at 4:23 PM, Alexander Bokovoy <span dir="ltr"><<a href="mailto:abokovoy@redhat.com" target="_blank">abokovoy@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5">On Wed, 14 Aug 2013, Andrew Lau wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I've got my FreeIPA setup in an internal infrastructure, but I want to be<br>
able to have users access the web UI externally. I tweaked the<br>
ipa-rewrite.conf so it won't redirect me to the FQDN and then tried both a<br>
nginx reverse proxy and port forwarding, both works if the client manually<br>
sets the host name of the IPA server eg. ipa01.internaldomain.local in<br>
their /etc/hosts file. However if the client tries to to use eg.<br>
<a href="http://ipa.externaldomain.com" target="_blank">ipa.externaldomain.com</a> with the same port forwarding or nginx proxy config,<br>
it'll silently error. The docs briefly touches on this - but doesn't really<br>
give much to go on.<br>
<br>
Any suggestions?<br>
</blockquote></div></div>
Couple considerations here.<br>
<br>
First, you may need to play with debug level to see what principal<br>
mod_auth_kerb picks up when negotiation happens.<br>
<br>
Second, using Kerberos authentication requires both sides to own<br>
Kerberos principals for authentication process to go. Browsers select<br>
HTTP/server.fqdn as their target service principal when connection to<br>
the server.fqdn. Your IPA server only has HTTP/ipa01.internaldomain.<u></u>local<br>
in its keytab in /etc/httpd/conf/ipa.keytab, which means it would only<br>
be able to respond on ipa01.internaldomain.local to Kerberos auth requests.<br>
<br>
A way to fix this is by making HTTP/<a href="http://ipa.externaldomain.com" target="_blank">ipa.externaldomain.com</a> service in<br>
IPA (ipa service-add HTTP/<a href="http://ipa.externaldomain.com" target="_blank">ipa.externaldomain.com</a>) and then use<br>
'ipa-getkeytab' to fetch the keytab with the key for the service. Next<br>
step would be to merge content of this keytab with<br>
/etc/httpd/conf/ipa.keytab:<br>
<br>
(echo rkt /tmp/external.keytab; echo wkt /etc/httpd/conf/ipa.keytab) |ktutil<br>
<br>
Then restart httpd -- I'm not sure mod_auth_kerb re-reads the keytab on<br>
its change.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
/ Alexander Bokovoy<br>
</font></span></blockquote></div><br></div></div>