<div dir="ltr"><div>Hi Bin,</div><div></div><div><br></div><div>In pulplift, which probably uses the default values for these settings in ansible-pulp, this is how the servers listen by default:<br></div><div><font face="monospace">[vagrant@pulp3-source-fedora30 ~]$ sudo netstat -lntp | grep -E ":248|:80"<br>tcp        0      0 <a href="http://127.0.0.1:24816">127.0.0.1:24816</a>         0.0.0.0:*               LISTEN      11871/python3       <br>tcp        0      0 <a href="http://0.0.0.0:80">0.0.0.0:80</a>              0.0.0.0:*               LISTEN      594/nginx: master p <br>tcp        0      0 <a href="http://127.0.0.1:24817">127.0.0.1:24817</a>         0.0.0.0:*               LISTEN      12007/python3    </font><br></div><div><br></div><div>So when I tried to connect to <ipaddress>:24817 rather than <ipaddress>:80, I got "connection refused" / "no route to host", not HTTP 403.</div><div><br></div><div>And note that under such a setup (with nginx in front), port 80 is the preferred way to access both pulp-api and pulp-content.</div><div><br></div><div>Can you confirm that your netstat looks similar to that? If so, then let's start looking for reasons why it would differ based on <ipaddress> vs localhost.</div><div><br></div><div>Also, you can run:</div><div>sudo journalctl -u pulp-api.service</div><div><br></div><div>-Mike</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 26, 2019 at 1:48 PM Bin Li (BLOOMBERG/ 120 PARK) <<a href="mailto:bli111@bloomberg.net">bli111@bloomberg.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_7356182847814103678rte-style-maintainer gmail-m_7356182847814103678rte-pre-wrap" style="white-space:pre-wrap;font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth"">Mike, we have the .netrc configured.  On the pulp server, it works if we use localhost:24817 but got 403 error when use <ipaddress>:24817. It looks like the Django only allows connection to localhost. We are looking for a way to connect from a different host.<br><br><div class="gmail-m_7356182847814103678rte-style-maintainer" style="font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth""><div><div class="gmail-m_7356182847814103678bbg-rte-fold-content"><div class="gmail-m_7356182847814103678bbg-rte-fold-summary">From: <a href="mailto:mikedep333@redhat.com" target="_blank">mikedep333@redhat.com</a> At: 09/25/19 19:21:51</div>To: <a href="mailto:bli111@bloomberg.net" target="_blank"> Bin Li (BLOOMBERG/ 120 PARK ) </a><br>Cc: <a href="mailto:pulp-list@redhat.com" target="_blank"> pulp-list@redhat.com</a><br>Subject: Re: [Pulp-list] Access Pulp 3 Api from a remote machine</div><br></div><div class="gmail-m_7356182847814103678rte-internet-block-wrapper" style="background:white;color:black;font-family:Arial,"BB.Proportional";font-size:small;white-space:normal"><div class="gmail-m_7356182847814103678rte-internet-block"><blockquote><div dir="auto">The http client needs to authenticate with username (default: "admin") and password (default: "password" or "admin").<div dir="auto"><br></div><div dir="auto">On Linux, Mac and Windows, you can create a ~/.netrc (Windows: %HOME%\_netrc ) file that httpie, curl, etc will use:</div><div dir="auto"><a href="https://github.com/bagder/everything-curl/blob/master/usingcurl-netrc.md" target="_blank">https://github.com/bagder/everything-curl/blob/master/usingcurl-netrc.md</a></div><div dir="auto"><br></div>-Mike<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Wed, Sep 25, 2019, 4:35 PM Bin Li (BLOOMBERG/ 120 PARK) <<a href="mailto:bli111@bloomberg.net" target="_blank">bli111@bloomberg.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_7356182847814103678m_-4920962077604235447rte-style-maintainer gmail-m_7356182847814103678m_-4920962077604235447rte-pre-wrap" style="white-space:pre-wrap;font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth"">Hi, We are trying to access the api on :24817 from remote server. We have add ALLOWED_HOSTS = ['*'] to settings.py and update the gunicorn to bind <a>0.0.0.0:24817</a>. Still getting a 403 Forbidden error. What else should we update to enable the remote api access?<div><br></div><div>Thanks</div></div></div>_______________________________________________<br>Pulp-list mailing list<br><a href="mailto:Pulp-list@redhat.com" target="_blank">Pulp-list@redhat.com</a><br><a href="https://www.redhat.com/mailman/listinfo/pulp-list" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-list</a></blockquote></div></div></blockquote><br></div></div></div></div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:capitalize"><span>Mike</span> <span>DePaulo</span><span style="text-transform:uppercase;color:rgb(170,170,170);margin:0px"></span></p><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:12px;margin:0px 0px 4px;text-transform:capitalize">He / Him / His</p><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:12px;margin:0px;text-transform:capitalize"><span>Service Reliability Engineer, Pulp</span></p><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;margin:0px 0px 4px;font-size:12px"><a href="https://www.redhat.com/" style="color:rgb(0,136,206);margin:0px" target="_blank">Red Hat<span></span></a></p><div style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:medium;margin-bottom:4px"></div><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;margin:0px;font-size:12px"><span>IM: <span>mikedep333</span></span></p><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:12px;margin:0px"><span>GPG: 51745404</span></p><div style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:medium;margin-top:12px"><table border="0"><tbody><tr><td width="100px"><a href="https://www.redhat.com/" target="_blank"><img src="https://marketing-outfit-prod-images.s3-us-west-2.amazonaws.com/f5445ae0c9ddafd5b2f1836854d7416a/Logo-RedHat-Email.png" width="90" height="auto"></a></td></tr></tbody></table></div></div></div>