Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tcp.md with better fallback config option support #653

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion docs/tcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,30 @@ Instead of choosing between UDP and TCP, you can use both. A single instance of

This allows you to use UDP most of the time, but fall back to TCP on the rare occasion that you need it.

Note that you will need to configure client connections manually. At this time it is not possible to generate a client config that will automatically fall back to the TCP connection.
Note that you can either (1) configure client connections manually (to respect the fallback server port difference) or (2) add `connection` configuration to your ovpn profiles. Referencing the OpenVPN docs:

```
<connection>
Define a client connection profile. Client connection profiles are groups of OpenVPN options that describe how to connect to a given OpenVPN server.
Client connection profiles are specified within an OpenVPN configuration file, and each profile is bracketed by <connection> and </connection>.
An OpenVPN client will try each connection profile sequentially until it achieves a successful connection.
```

An example of this would be (inside of a client ovpn profile):

```
...
<connection>
remote my.vpn.server 1194 udp
</connection>

<connection>
remote my.vpn.server 443 tcp
</connection>
...
```

In this scenario, the client would first attempt to connect over UDP traffic on port 1194. If the connection is unsuccessful, it will then automatically attempt to the next connection block (in this case, TCP traffic on port 443). This can be very useful and seamless for setting up your fallback server.

## Forward HTTP/HTTPS connection to another TCP port
You might run into cases where you want your OpenVPN server listening on TCP port 443 to allow connection behind a restricted network, but you already have a webserver on your host running on that port. OpenVPN has a built-in option named `port-share` that allow you to proxy incoming traffic that isn't OpenVPN protocol to another host and port.
Expand Down