Skip to content

Commit 8af75ad

Browse files
maxvppedrosousa
andauthored
[Gateway] Proxy endpoint firewall config (#19265)
Co-authored-by: Pedro Sousa <[email protected]>
1 parent b125bbd commit 8af75ad

File tree

1 file changed

+112
-7
lines changed
  • src/content/docs/cloudflare-one/connections/connect-devices/agentless

1 file changed

+112
-7
lines changed

src/content/docs/cloudflare-one/connections/connect-devices/agentless/pac-files.mdx

Lines changed: 112 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ sidebar:
88
import { Details, GlossaryDefinition, TabItem, Tabs } from "~/components";
99

1010
:::note
11-
1211
Only available on Enterprise plans.
13-
1412
:::
1513

1614
You can apply Gateway HTTP and DNS policies at the browser level by configuring a Proxy Auto-Configuration (PAC) file.
@@ -28,7 +26,6 @@ Install a [Cloudflare certificate](/cloudflare-one/connections/connect-devices/u
2826
You can generate a proxy endpoint on the Zero Trust dashboard or through the Cloudflare API.
2927

3028
:::caution
31-
3229
All devices you add to the proxy endpoint will be able to access your Cloudflare Tunnel applications and services. If you only want to proxy web traffic, you can build a network policy that blocks those source IPs from connecting to your internal resources.
3330
:::
3431

@@ -48,9 +45,7 @@ All devices you add to the proxy endpoint will be able to access your Cloudflare
4845
- **IPv6**: `2001:0db8:0000:0000:0000:1234:5678:0000/109`
4946

5047
:::note
51-
5248
Gateway limits the prefix length of source networks for proxy endpoints to `/8` for IPv4 networks and `/32` for IPv6 networks.
53-
5449
:::
5550

5651
5. Select **Save endpoint** and confirm the endpoint creation.
@@ -80,9 +75,7 @@ https://<SUBDOMAIN>.proxy.cloudflare-gateway.com
8075
- **IPv6**: `2001:0db8:0000:0000:0000:1234:5678:0000/32`
8176

8277
:::note
83-
8478
Gateway limits the prefix length of source networks for proxy endpoints to `/8` for IPv4 networks and `/32` for IPv6 networks.
85-
8679
:::
8780

8881
2. After running the call, you should see an output similar to
@@ -197,6 +190,118 @@ To test your configuration, you can test any [supported HTTP policy](#limitation
197190

198191
You can now use the Proxy Endpoint selector in [network](/cloudflare-one/policies/gateway/network-policies/#proxy-endpoint) and [HTTP](/cloudflare-one/policies/gateway/http-policies/#proxy-endpoint) policies to filter traffic proxied via PAC files.
199192

193+
## Configure firewall
194+
195+
You may need to configure your organization's firewall to allow your users to connect to a proxy endpoint. Depending on your firewall, you will need to create a rule using either your proxy endpoint's domain or IP addresses.
196+
197+
To get the domain of a proxy endpoint:
198+
199+
<Tabs syncKey="dashPlusAPI">
200+
201+
<TabItem label="Dashboard">
202+
203+
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Gateway** > **Proxy endpoints**.
204+
2. Choose the proxy endpoint. Select **Edit**.
205+
3. In **Proxy Endpoint**, copy the domain.
206+
207+
</TabItem>
208+
209+
<TabItem label="API">
210+
211+
1. Use the [List proxy endpoints](/api/resources/zero_trust/subresources/gateway/subresources/proxy_endpoints/methods/list/) operation to get a list of your proxy endpoints and their details. For example:
212+
213+
```bash
214+
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/proxy_endpoints \
215+
--header "Authorization: Bearer <API_TOKEN>"
216+
```
217+
218+
```json {10} output
219+
{
220+
"success": true,
221+
"result": {
222+
"id": "ed35569b41ce4d1facfe683550f54086",
223+
"created_at": "2014-01-01T05:20:00.12345Z",
224+
"ips": [
225+
"192.0.2.1/32"
226+
],
227+
"name": "DevOps team",
228+
"subdomain": "oli3n9zkz5.proxy.cloudflare-gateway.com",
229+
"updated_at": "2014-01-01T05:20:00.12345Z"
230+
}
231+
}
232+
```
233+
234+
2. Find the proxy endpoint you want to use.
235+
3. Copy the value of the `subdomain` key.
236+
237+
</TabItem>
238+
239+
</Tabs>
240+
241+
Using your proxy endpoint's domain, you can get the IP addresses assigned to the proxy endpoint:
242+
243+
<Tabs>
244+
245+
<TabItem label="macOS and Linux">
246+
247+
1. Open a terminal.
248+
2. Run `dig` on your proxy endpoint's A records to get its IPv4 addresses. For example:
249+
250+
```bash
251+
dig A example.cloudflare-gateway.com +short
252+
```
253+
254+
```txt output
255+
162.159.36.5
256+
162.159.36.20
257+
```
258+
259+
3. Run `dig` on your proxy endpoint's AAAA records to get its IPv6 addresses. For example:
260+
261+
```bash
262+
dig AAAA example.cloudflare-gateway.com +short
263+
```
264+
265+
```txt output
266+
2606:4700:54::a29f:2407
267+
2606:4700:5c::a29f:2e07
268+
```
269+
270+
</TabItem>
271+
272+
<TabItem label="Windows">
273+
274+
1. Open a PowerShell terminal.
275+
2. Run `Resolve-DnsName` on your proxy endpoint's A records. Your proxy endpoint's IPv4 addresses will appear under `IPAddress`. For example:
276+
277+
```powershell
278+
Resolve-DnsName -Name example.cloudflare-gateway.com -Type A
279+
```
280+
281+
```txt output
282+
Name Type TTL Section IPAddress
283+
---- ---- --- ------- ---------
284+
example.cloudflare-gateway.com A 300 Answer 162.159.36.5
285+
example.cloudflare-gateway.com A 300 Answer 162.159.36.20
286+
```
287+
288+
3. Run `Resolve-DnsName` on your proxy endpoint's AAAA records. Your proxy endpoint's IPv6 addresses will appear under `IPAddress`. For example:
289+
290+
```powershell
291+
Resolve-DnsName -Name example.cloudflare-gateway.com -Type AAAA
292+
```
293+
294+
```txt output
295+
Name Type TTL Section IPAddress
296+
---- ---- --- ------- ---------
297+
example.cloudflare-gateway.com AAAA 300 Answer 2606:4700:5c::a29f:2e07
298+
example.cloudflare-gateway.com AAAA 300 Answer 2606:4700:54::a29f:2407
299+
```
300+
301+
</TabItem>
302+
303+
</Tabs>
304+
200305
## Limitations
201306

202307
### Traffic limitations

0 commit comments

Comments
 (0)