# Expose NAT server

## Test the server

One of the best options is to use a SSH jump host server. For example, you can use serveo.net to test.

In your proxy server, run:

```bash
/usr/bin/ssh -R 35854:localhost:3128 serveo.net
```

In your client, run:

```bash
export http_proxy="http://USER:PASSWORD@serveo.net:35854"
export https_proxy="http://USER:PASSWORD@serveo.net:35854"
export ftp_proxy="http://USER:PASSWORD@serveo.net:35854"
export no_proxy="localhost,127.0.0.1,::1"
curl http://www.google.com
```

### Setup serveo.net as a service

Make sure systemd is installed:

```
apt update
apt install systemd
```

Create the service file:

```bash
nano /etc/systemd/system/serveo-proxy.service
```

With the following content:

```
[Unit]
Description=Serveo proxy tunnel
After=network-online.target

[Service]
User=root
ExecStart=/usr/bin/ssh -R 35854:localhost:3128 serveo.net
RestartSec=3
Restart=always

[Install]
WantedBy=multi-user.target
```

Start and enable the service:

```
sudo systemctl daemon-reload
sudo systemctl enable serveo-proxy.service
sudo systemctl start serveo-proxy.service
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.devops.buzz/public/squid/expose-nat-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
