I have been trying to get the openvpn rockon to run on a tcp port, but I have been unsuccessful. I found this comment from kylemanna here that gives instructions on how to change the port.
I want to use openvpn on port 443 to get through access points at hotels and businesses that block all other ports. I can use any port as long as it is tcp because I can use my router to do port forwarding. That way it does not conflict with the management site.
The commands kylemanna provides seem to work without errors. I am able to generate a new config with the right ports, but the docker container still only accepts 1194/udp. Does anyone know how I can get the container to listen on the correct port?
To run on port 443 no special config file hacks are needed, just generate a proper config and user Docker to map the port.
Configure it internally to use TCP:
$ docker run --volumes-from $OVPN_DATA --rm kylemanna/openvpn ovpn_genconfig -u tcp://VPN.SERVERNAME.COM
Tell Docker to map port 443/tcp on the host to port 1194 in the container at runtime:
$ docker run --volumes-from $OVPN_DATA -d -p 443:1194 --privileged kylemanna/openvpn
@sudowoodo I don’t think you can use port 443 as it is taken by the https access of Rockstor’s own WebUI.
We do have an open issue custom web-ui port to address this limitation though. That issue in turn links to another forum thread that instigated the issue:-
Linking here for context as you requirement is a use case for this feature.
@phillxnet if I can set the docker container to listen on port 1194 tcp, I edit the ovpn file that is created to change the port to 443 for the client. I then set port forwarding on my router where external port 443 tcp = 1194 tcp on my rockstor machine.That is my plan at least. I have successfully forwarded udp traffic from port 993 to 1194 on the rockstor machine using this method.
I have one more piece of information that might help. When I run the following command, it creates a snapshot that I can see in the web ui in the rock-on-root.
docker run --volumes-from openvpn -d -p 1194:1194/tcp --privileged kylemanna/openvpn
If you put a ``` on the line directly before and after your JSON Rockon definition when pasting into the forum then it will be easier for people to check. Also a good web based checker for json compliance is available at:
This will also nicely format the output once you press the “Validate JSON” button.