Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Jun 29, 2012 6:51 pm 
Offline
Junior Member

Joined: Thu Jun 16, 2011 12:49 am
Posts: 27
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!


Top
   
PostPosted: Sat Jun 30, 2012 12:46 am 
Offline
Junior Member
User avatar

Joined: Tue Dec 27, 2005 1:33 am
Posts: 43
Location: USA
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)


Top
   
PostPosted: Mon Jul 02, 2012 1:14 pm 
Offline
Junior Member

Joined: Thu Jun 16, 2011 12:49 am
Posts: 27
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! :D


Top
   
PostPosted: Mon Jul 02, 2012 1:45 pm 
Offline
Junior Member
User avatar

Joined: Tue Dec 27, 2005 1:33 am
Posts: 43
Location: USA
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"
push "route 10.8.0.0 255.255.255.0"
push "route 10.9.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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group