Having more than one public IP from a Server

Is it possible to have more than one public IP from your server? I mean, I have a router connected to my home modem and this router is setup as VPN server where I connect several routers to it outside home to have in them my home IP and I was wondering if I can have those routers that are outiside home with different public IP.

No. Because you only have one server with one public IP.

What about if I have an ISP which provides more than one public IP address?

My ISP provide me a modem which has two LAN ports, each LAN port will give me one public IP.

But I need to use two routers to get the two IP address.

Well, theoretically you can use just one router for multiple IPs. It‘s totally fine.

But not with the GL GUI. You will need plain OpenWrt for it.

It would be possible aslong the isp allows that and gives you a ip block/cidr notation, often in datacenters like ovh they call it ripe blocks but in your case the isp only gives you a range subnet.

Most of the times they do this with ipv6, though my ipv6 knowledge is not good.

however the questions remain for me:

  • why would you need more multiple ip?

  • Is your vpns public ip dynamic and you want a static/fixed access ?


I think you want to cascade x external routers through your vpn server to multiple external vpn?

I kinda do that but this is not possible with normal gl ui, you need PBR from stangri and perhaps depending how the situation is based also use vxlan to push vlans, the vlan option is optional because this is how i use it.

Its like this:

MT3000 (different home) ↔ both wifis use vxlan.50 from the vxlan tunnel in wireguard ↔ vxlan ↔ wireguard client ↔ flint 2 wireguard server (other home) ↔ vxlan ↔ br-lan.50 (vx.50 is tagged here) (which routes over mullvads vpn)

That way i can use vlans, but also route my vlans routes through different vpn with stangris pbr, complicated yes, but this makes setting it up easier, even all firewalling works as from home and i can even use the other services like that aswell :wink:

Thank you for you replay @xize11 .
I need this because I have several routers connected to the server I hace at home, they are using the routers to work and need to have all them diferent publi IP one from the other.

My public IP address is static, it does not change.
It would be a big help if you can explain to me how I can achieve this, having the routers connected to my server I have at home with different public IP one from another.

My best guess is look into setting up a wireguard server, what you optionally need is a site to site setup.

With gl ui this is kinda hard to accomplish my knowledge with routing is not good, but with normal openwrt you can install luci-app-pbr.

Heres some usefull links what i think can help you:

For the vpn setup:

For pbr aka policy routing:
[OpenWrt Wiki] PBR (Policy-Based Routing) this documentates luci-app-pbr aswell for different ways.

For luci-app-pbr in general:

if vlans through the vpn is really really important let me know if you are interested into using vxlan :+1:

There is also a bonus package for wireguard+vxlan called unetd though ive tested this very limited, but it is supposed to make it easier :wink:

Can one set up subinterfaces in luci? Like eth0:0 for instance, and assign multiple IPs to each? Have never tried this on these devices, but that is how I would approach it in a similar linux box.