| Linode Forum https://forum.linode.com/ |
|
| OpenVPN Configuration - Multiple Ports https://forum.linode.com/viewtopic.php?f=19&t=9078 |
Page 1 of 1 |
| Author: | iWizardPro [ Fri Jun 29, 2012 6:51 pm ] |
| Post subject: | OpenVPN Configuration - Multiple Ports |
Hello, I currently have my OpenVPN connection setup to accept connections from: TCP 443, TCP 8080, and UDP 1194. Is there a way that I can have all three of these server configurations assign from just one IP pool? (For ex. 10.7.0.x) Right now they all assign on their own IP pools: TCP 443 - 10.7.0.1 TCP 8080 - 10.8.0.1 UDP 1194 - 10.9.0.1 Thank you in advance! |
|
| Author: | AGWA [ Sat Jun 30, 2012 12:46 am ] |
| Post subject: | Re: OpenVPN Configuration - Multiple Ports |
I'm assuming you're currently running 3 different OpenVPN servers - one for each port? You can run just one OpenVPN server for all TCP ports, and just one OpenVPN server for all UDP ports, and give each server its own IP address pool. Then you can use iptables to redirect ports. Unfortunately it's not possible to combine the TCP and UDP servers because TCP and UDP are very different protocols. If you want to do this with your TCP servers, choose just one of the ports to run OpenVPN on (let's say 443), and then set up the following iptables rule for the other port (8080): Code: iptables -t nat -A PREROUTING -d X.X.X.X -p tcp --dport 443 -j DNAT --to-destination :8080 (replace X.X.X.X with your server's IP address) |
|
| Author: | iWizardPro [ Mon Jul 02, 2012 1:14 pm ] |
| Post subject: | Re: OpenVPN Configuration - Multiple Ports |
Thanks for the suggestion. But, the problem I am trying to solve is a little more complicated. My email server is located at 10.8.0.1 and I currently use dnsmasq to set internal-network.example.com to route to 10.8.0.1 so that my SSL certificate would be valid for *.example.com. However, I have now run into the problem where if I connect via TCP 443, there is no set route to 10.8.0.1 and it causes it to try to connect to the local wireless AP I am connected to, which causes my connection to fail. Is there a solution to this problem? Thanks! |
|
| Author: | AGWA [ Mon Jul 02, 2012 1:45 pm ] |
| Post subject: | Re: OpenVPN Configuration - Multiple Ports |
Yeah, you can configure each VPN server to push a route to the other VPN subnets, by adding options like these to the config files: Code: push "route 10.7.0.0 255.255.255.0" Now when VPN clients connect they should get routes to your mail server at 10.8.0.1 regardless of which VPN server they connected to. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|