Score:-1

How to handle multiple public IP address with a router

tr flag

For now I have 1 static/public IP from my provider and I use an Asus RT-AX92U to forward http to a web server. I will have the opportunity to get several other static IP addresses and I would like to forward the second static IP to another server.

static ip 1 ---> http forwarded to server 1
static ip 2 ---> http forwarded to server 2

I my router, in the "port forwarding" section I don't see a way to handle this. Looks like this router can only handle one static IP.

My question is: Should I buy another router which will be able to handle this (I do not ask for purchasing recommendations, a simple "another router can handle this" is ok) --- or---- should I connect my second Asus RT-AX92U (yes, I have 2 of them) in some way (by creating a route* or such?) --- or any other advise

*I see that there is a "route" section in the router. I can add a route by filling "Network/Host IP", "Netmask", "Gateway", "Metric" and "Interface". Maybe this could answer my question... or not!

vidarlo avatar
ar flag
This question will probably be better answered over at [superuser.com](https://superuser.com)
mfinni avatar
cn flag
If this is for home or a hobbyist project, definitely take this to SuperUser. If this is for work, buy a real router; you can make subinterfaces that can have different IPs, you're not going to solve this with just routing.
Score:2
es flag

First of all, I have never seen your router so I cannot tell you if it can handle it. Only someone who has the same device can tell you definitely. I would recommend trying to play with these settings on some test network with other routers. That means creating local network with two different ip addresses on your router and trying to send data to those addresses from different devices to see if it sends data to correct servers.

From what I looked up on the internet - the router is not that much manageable on lower levels. If you don't make it work by yourself, I would recommend getting another router that you can surely use to do this (for example mikrotik is in same price range or some used older cisco).

However there is another option which I think may help you and that is reverse proxy- for example nginx. It can route traffic based on ip or hostname in a lot of cases (mail, http and ssl). That would mean the traffic goes all to one server (the reverse proxy) and then the server decides where to send it.

TLDR answer: play around with it, buy managable router or use reverse proxy

Edit: For those settings on the end of your question, it might work if you would fill "Network/Host IP", "Netmask", "Gateway", "Metric" and "Interface" as <Public IP 2>, 32(or 255.255.255.255), <IP of server 2>, [0,1], <interface with cable leading to server 2>

Baud avatar
tr flag
Thank you!! I have a problem with the reverse proxy solution (see: https://drupal.stackexchange.com/questions/309701/reverse-proxy-and-auto-complete-with-mixed-content/309759?noredirect=1#309759) this is why I am looking for the added IPs. As you told me that the "route section" solution might work, I will try it when I will have the added IPs. For now, I will credit you for a good answer and I will spend some days to figure out why the reverse proxy doesn't work...
Score:0
us flag

Route section in your modem is not going to help you in this regard. You want to redirect external traffic(from the Internet), to your internal servers, which you need to use port-forward or DNAT.

in simple definition:(From Wikipedia):

What Route is: In packet switching networks, routing is the higher-level decision-making that directs network packets from their source toward their destination.

What Port Forwarding is: Port forwarding allows remote computers (for example, computers on the Internet) to connect to a specific computer or service within a private local-area network (LAN).

us flag
I this this is wrong. He doesn't want to forward his static IP address to a computer with a private IP address. He wants the computer itself to have the static ip address.
Baud avatar
tr flag
thank you! You told me that the route section will not help me but Hynek Bernard is saying that it might work... I will try it
es flag
That routing does not disregard my answer, it actually helps it. Router routes - directing network packet from source to destination, that means the router directs it from one network to another. If the network is just one server, it can handle the packet from WAN to server 2 and work well. He wouldn't be using NAT so no port forwarding is required, only for server one which would be inside his home network.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.