Score:-1

Multiple virtual network interfaces with own public IPs

dk flag

I'm currently trying to set my server/old computer up, to run multiple different services, each with a different Network interface, so I can forward them to different DynDNS's via DDclient. However, this would require each of the virtual Interfaces to have an individual public IP, which I haven't figured out on how to get. I've tried googling and found this article, however doing that, just keeps the Server from having any internet access, I have also tried to make a Dummy interface, but it doesn't have a Public IP, if any. Is there anyway to do what I described above, or am I trying something impossible, and if it is impossible, are there any alternatives!

Thanks in advance, Fischchen

user535733 avatar
cn flag
Many folks use a single IP address and different port numbers: `http://my.server.net:12345` for a particular service listening on port 12345. A different service uses port 23456. Most services can be configured to listen on any port you wish.
Fischchen avatar
dk flag
Thanks for the reply, but i want to Seperate private applications like Password managers and less private applications like minecraft servers, by the hostname.
Score:0
in flag

Public IP addresses are handed out by your internet provider, most of the time you use DHCP to receive a public IP address. Most ISP's will only provide one IPv4 address at a time. Only through IPv6 you can have whole subnets to assign to each of the interfaces.

What you can do is do portforwarding as proposed by user535733, you can assign multiple names to the one IP address you have so you can use for instance minecraft.mydomain.net and port forward tcp/25565 or udp/19132 to your minecraft server. You can then use passwrdmgr.mydomain.net with exactly the same IP address and then port forward tcp/8080 or whereever it is running.

The article you linked is for bridging two interfaces into one, which would make them act as one ethernet network. I think you wanted to separate the interfaces and not join them. It's also for archlinux and not Ubuntu.

ddclient monitors an interface for ip address changes and sends it to a dns provider. I personally have 2 domains and host them both at AWS Route53, previously I used ddclient in combination with DYNDNS.

Here it says that you can use ddclient in combination with noip.

https://medium.com/@nobuto_m/minimal-dynamic-dns-configuration-for-no-ip-com-with-ddclient-cb7c038a74be

In the file /etc/ddclient/ddclient.conf you can add 2 times the same block, but with a different

use=web
ssl=yesprotocol=noip
login=yourusername
password=yourpassword
minecraft.noip.com

use=web
ssl=yesprotocol=noip
login=yourusername
password=yourpassword
password.noip.com

This should give you 2 domainnames (minecraft/password) pointing to the same IP address.

Since IPv4 is only 4 bytes long there is a shortage and most providers give customers only one address. But IPv6 is 16bytes long, you can get your own subnet with an enormous range. Say you're provider assigns an address to you 2001:678:5d4:123::1/64. The /64 divides the first 64 bits into the network part which indicates your provider, the last 64 bits can be assigned by you. so you can assign ::1 to your minecraft interface, ::2 for your vpn and so on.

Ubuntu has an explanation on how to read IPv6 Addresses https://wiki.ubuntu.com/IPv6#Reading_IPv6_Addresses

The implementation of IPv6 depends on your provider, assuming you can read german, this may be useful https://telekomhilft.telekom.de/t5/Festnetz-Internet/Richtiges-IPv6-Subnetting/td-p/5068434

Using two hostnames on one ip address does mean that portforwarding does allow mixing, so minecraft.noip.com:80 and password.noip.com:25565 would work. if the password manager is on a webserver, you can configure the webserver to only serve the correct hostname.

Networking is heavily layered, the hostname maps to an ip address, that ip address ties to an interface that can be reached by a route, the application using the service uses udp or tcp protocols, which can be firewalled and portforwarded (dnat) to an internal server and through firewalling you can forbid traffic between two area's. You do have to be careful, because this is quiet complicated and not easy to read.

I run my stuff mostly in docker containers, it runs one application in a restricted space, it can communicate with other docker containers unless you put it in a separate docker network. Docker compartmentalizes the linux kernel. I run multiple applications on one Ubuntu server, but the applications run isolated from eachother if I specify them to run in their own network.

This is how I run my minecraftserver

docker run -d -it --name mc-server -e EULA=TRUE -p 19132:19132/udp -v mc-volume:/data itzg/minecraft-bedrock-server
Fischchen avatar
dk flag
Thanks for the answer sleepyhead, but how do i setup that? Does ddclient accept writing abc.noip.com in the config? And the part with the IPv6 seems interesting, could you please provide me with a link or simmelar? I don't seem to find anything. Thanks
Fischchen avatar
dk flag
Thanks a lot, this really helped me. however when forwarding both to the same IP, you szill could access the password manager via the MC server IP, right? Because you cant limit the forwarded port with ddclient. Or am i understanding that wrong?
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.