summaryrefslogtreecommitdiff
path: root/admin/answer-captcha.html
blob: 639748a3d04f75470953dbc1c60cffa8564c4bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE html>

<html lang="en" data-content_root="../">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Answer CAPTCHA from server’s IP &#8212; SearXNG Documentation (2024.5.10+ffb1001f8)</title>
    <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
    <link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
    <link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
    <script src="../_static/documentation_options.js?v=ae3a6ae6"></script>
    <script src="../_static/doctools.js?v=9a2dae69"></script>
    <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
    <script src="../_static/tabs.js?v=3030b3cb"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Limiter" href="searx.limiter.html" />
    <link rel="prev" title="SearXNG maintenance" href="update-searxng.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="searx.limiter.html" title="Limiter"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="update-searxng.html" title="SearXNG maintenance"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2024.5.10+ffb1001f8)</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">Answer CAPTCHA from server’s IP</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="answer-captcha-from-server-s-ip">
<h1>Answer CAPTCHA from server’s IP<a class="headerlink" href="#answer-captcha-from-server-s-ip" title="Link to this heading"></a></h1>
<p>With a SSH tunnel we can send requests from server’s IP and solve a CAPTCHA that
blocks requests from this IP.  If your SearXNG instance is hosted at
<code class="docutils literal notranslate"><span class="pre">example.org</span></code> and your login is <code class="docutils literal notranslate"><span class="pre">user</span></code> you can setup a proxy simply by
<a class="reference external" href="https://manpages.debian.org/jump?q=ssh">ssh</a>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># SOCKS server: socks://127.0.0.1:8080</span>

$<span class="w"> </span>ssh<span class="w"> </span>-q<span class="w"> </span>-N<span class="w"> </span>-D<span class="w"> </span><span class="m">8080</span><span class="w"> </span>user@example.org
</pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">socks://localhost:8080</span></code> from above can be tested by:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-c2VydmVyJ3MgSVA=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-0-c2VydmVyJ3MgSVA=" name="c2VydmVyJ3MgSVA=" role="tab" tabindex="0">server’s IP</button><button aria-controls="panel-0-ZGVza3RvcCdzIElQ" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-0-ZGVza3RvcCdzIElQ" name="ZGVza3RvcCdzIElQ" role="tab" tabindex="-1">desktop’s IP</button></div><div aria-labelledby="tab-0-c2VydmVyJ3MgSVA=" class="sphinx-tabs-panel group-tab" id="panel-0-c2VydmVyJ3MgSVA=" name="c2VydmVyJ3MgSVA=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>curl<span class="w"> </span>-x<span class="w"> </span>socks://127.0.0.1:8080<span class="w"> </span>http://ipecho.net/plain
n.n.n.n
</pre></div>
</div>
</div><div aria-labelledby="tab-0-ZGVza3RvcCdzIElQ" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-0-ZGVza3RvcCdzIElQ" name="ZGVza3RvcCdzIElQ" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>curl<span class="w"> </span>http://ipecho.net/plain
x.x.x.x
</pre></div>
</div>
</div></div>
<p>In the settings of the WEB browser open the <em>“Network Settings”</em> and setup a
proxy on <code class="docutils literal notranslate"><span class="pre">SOCKS5</span> <span class="pre">127.0.0.1:8080</span></code> (see screenshot below).  In the WEB browser
check the IP from the server is used:</p>
<ul class="simple">
<li><p><a class="reference external" href="http://ipecho.net/plain">http://ipecho.net/plain</a></p></li>
</ul>
<p>Now open the search engine that blocks requests from your server’s IP.  If you
have <a class="reference external" href="https://github.com/searxng/searxng/issues/2011#issuecomment-1553317619">issues with the qwant engine</a>,
solve the CAPTCHA from <a class="reference external" href="https://www.qwant.com/">qwant.com</a>.</p>
<hr class="docutils" />
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-1-RmlyZWZveA==" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-1-RmlyZWZveA==" name="RmlyZWZveA==" role="tab" tabindex="0">Firefox</button></div><div aria-labelledby="tab-1-RmlyZWZveA==" class="sphinx-tabs-panel group-tab" id="panel-1-RmlyZWZveA==" name="RmlyZWZveA==" role="tabpanel" tabindex="0"><figure class="align-default" id="id1">
<img alt="FFox proxy on SOCKS5, 127.0.0.1:8080" src="../_images/ffox-setting-proxy-socks.png" />
<figcaption>
<p><span class="caption-number">Fig. 1 </span><span class="caption-text">Firefox’s network settings</span><a class="headerlink" href="#id1" title="Link to this image"></a></p>
</figcaption>
</figure>
</div></div>
<div class="admonition-man-ssh-manual admonition">
<p class="admonition-title"><a class="reference external" href="https://manpages.debian.org/jump?q=ssh">ssh</a> manual:</p>
<dl class="simple">
<dt>-D [bind_address:]port</dt><dd><p>Specifies a local “dynamic” application-level port forwarding.  This works
by allocating a socket to listen to port on the local side ..  Whenever a
connection is made to this port, the connection is forwarded over the
secure channel, and the application protocol is then used to determine
where to connect to from the remote machine .. ssh will act as a SOCKS
server ..</p>
</dd>
</dl>
<dl class="option-list">
<dt><kbd><span class="option">-N</span></kbd></dt>
<dd><p>Do not execute a remote command.  This is useful for just forwarding ports.</p>
</dd>
</dl>
</div>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
  <span id="sidebar-top"></span>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  
    
            <p class="logo"><a href="../index.html">
              <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
            </a></p>
  

<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference