How can I combine multiple IP pools from different locations

meanmeachine

Verified User
Joined
Dec 22, 2020
Messages
7
I want to know if it's possible for me to use IP blocks I have assigned on various virtual machines around Europe on a central server.

For example VPS1 would have IP block 1.1.1.1/24 and VPS 2 would have 1.1.2.1/24 if domain1.com resolves to 1.1.1.x then it will go through VPS 1 > DirectAdmin hosted in another location. A bit like this:


0062fe609797ce4a29b6fe9a81d0ae2d.png



The three VPS will only be a tunnel/proxy no files will be hosted on them - How would you go about doing this? I presume each VPS will need to have the DNS only DA installed on it too.
 
If you have your own /24 network then your hostingproviders will route anything for that /24 to e.g. your 1.1.1.1 gateway. There you'll forward the traffic to the x.x.x.x with your DA installation. On your DA setup you can add all your sites with the same ip.

I think this is to setup a cheap link network so your websites kan have different ip-addresses? Because there is nothing other I can think of why you would setup something this complex without any benefits of redundancy or loadbalancing.

But... if you have /24 blocks then you'd already know this and there's nothing cheap about that, so I think you only have a few vm's with a single ip-address and you're trying to get traffic of e.g. 1.1.1.x to route to 1.1.1.1 and that's not going to work. A 1.1.1.5 might belong to another customer of that hostingprovider. Simply assigning an ip to a domain in DNS doesn't mean it also get's routed to your vps. Your upstream decides what gets routed to your vps and what not.
 
If you have your own /24 network then your hostingproviders will route anything for that /24 to e.g. your 1.1.1.1 gateway. There you'll forward the traffic to the x.x.x.x with your DA installation. On your DA setup you can add all your sites with the same ip.

I think this is to setup a cheap link network so your websites kan have different ip-addresses? Because there is nothing other I can think of why you would setup something this complex without any benefits of redundancy or loadbalancing.

But... if you have /24 blocks then you'd already know this and there's nothing cheap about that, so I think you only have a few vm's with a single ip-address and you're trying to get traffic of e.g. 1.1.1.x to route to 1.1.1.1 and that's not going to work. A 1.1.1.5 might belong to another customer of that hostingprovider. Simply assigning an ip to a domain in DNS doesn't mean it also get's routed to your vps. Your upstream decides what gets routed to your vps and what not.
The /24 blocks where just an example. I have multiple IP blocks already. I am not dumb enough to try and use an IP not available to me :). The reason for me doing this is I am with OVH and they limit the amount of IPs per server can have so rather than having multiple DA installations I want to just create some sort of tunnel between the servers > main DA server.
 
We have servers on OVH too, and using /26 (64 Ip's) without any problems. Or 64 ips per server not enough for You?
 
Still, if you have multiple blocks, you already have your gateways setup. Just install haproxy on the vps and use the da-server as a backend server.
 
Still, if you have multiple blocks, you already have your gateways setup. Just install haproxy on the vps and use the da-server as a backend server.
How would I go about doing that?

Code:
global
    daemon
    maxconn 256
    user        haproxy
    group       haproxy
    chroot      /var/lib/haproxy

defaults
    mode http
    timeout connect 5000ms
    timeout client 50000ms
    timeout server 50000ms

frontend http
    bind *:80
    bind *:2222
    default_backend servers

backend servers
    balance roundrobin
    mode http
    option forwardfor
    option httpchk GET /
    server server1 51.38.xxx.xxx check

Is my config, the IP passes through but once I add the IP inside DA it stops working. Can it be done through public IPs? How do I assign a HAproxy IP to an DA account.
 
Last edited:
Don't add the ip in da. Just use the server's ip in the da-box. The only other place where you need the DA box ip is in the backend server section of you haproxy config. There are a lot of good haproxy tutorials around.

domain.com -> resolves to 1.1.1.10 -> is routed bij your hostingprovider to your haproxy vps -> proxies to 51.38.x.x (the DA box).
 
Don't add the ip in da. Just use the server's ip in the da-box. The only other place where you need the DA box ip is in the backend server section of you haproxy config. There are a lot of good haproxy tutorials around.

domain.com -> resolves to 1.1.1.10 -> is routed bij your hostingprovider to your haproxy vps -> proxies to 51.38.x.x (the DA box).
Thanks. I can't actually find guides on this forum built around DA. What config is optimal to forward everything that needs to be sent eg email/ftp routes as I currently only are set up for port 80 & 2222.

I presume it's best for me to install DirectSlave for DNS on the HA proxy VPS too?
 
Back
Top