Running a contabo virtual server with 2 ips running a wordpress site via nginx. One Ip is running the website and the second IP I want for the docker mailcow.
from tacobytes@programming.dev to selfhosted@lemmy.world on 07 Apr 04:48
https://programming.dev/post/48420234
from tacobytes@programming.dev to selfhosted@lemmy.world on 07 Apr 04:48
https://programming.dev/post/48420234
I am setting up a server with contabo and I have it set to two IPs
This is my netplan which I have altered in a attempt to not put myself on blast.
network:
version: 2
ethernets: # Define an Ethernet interface (eth0 in this case).
eth0:
match:
macaddress: "01:70:76:77:81:3c"
addresses: # Assign multiple IP addresses to the interface.
- xxx.xx.x.359/21 # Website's IP address (primary).
- xxx.xx.x.360/21 # Email server's IP address (secondary).
nameservers:
addresses:
- 'xxx.xxx.xx.xx'
- 'xxx.xxx.xx.xx'
- 'xxxx:xxxx:xxxx::x:xx'
set-name: "eth0"
routes:
- to: default
via: 219.69.0.1
- on-link: true
to: default
via: fe80::1
I want mailcow on one ip and the website on the other. I am running wordpress website via nginx. Do you have advice other than how I should run the mail server on a different server? I was going to use the docker container version of mailcow. I have hit a brick wall as I am lost in the sauce. I was woundering if anyone else has attempted to do this.
So to simplify I am running a contabo virtual server with 2 ips running a wordpress site via nginx. One Ip is running the website and the second IP I want for the docker mailcow.
threaded - newest
One IPv4 would be sufficient and easy to set up. Feels like two separate VPS because Mail and Webserver have no conflicts. If you want to run two IPs you’ll need two eth devices. Set up eth0 for web and eth1 for mail.
Why would anyone want two ips without two physical ports. Thats the real question I think. I just got lost in the sauce but deep down I thought I would need two eth devices. They are not physical so there is no point. Right? Thanks for responding
Logical IP addressing and physical interfaces are completely separate. One physical interfaces with multiple IPs, many physical interfaces bound together into one logical interface, depends on the situation.
You can bind an exposed port to a specific IP by prefixing the IP address like this “-p xxx.xx.x.360:80:80”. Should work in a compose file “ports” list as well.
For outgoing traffic it’s a bit trickier, but if you create a separate network I think it should be possible to inject an iptables SNAT rule to use a specific source IP. Might be handy to make sure you’re sending emails from the correct IP but with your setup I would just make sure to use the primary IP as email egress..
I am going to put what you said into chatgipity and see what type of french you be speakin. local of cource… Super noob. Thanks for responding
So is there a problem or is this working? You haven’t said.
You may have to do a lot more configuration on the docker network side, though. What’s the reason for the separate addresses? Using one would be a lot easier.
The website is working. The mailcow is not. I heard some stuff about reputation and what not… I am a uber noob. I wanted to make sure there was no conflicts… I don’t really know anymore hahaha… good to know I can do it all on one ip. Thanks for responding
So what’s the problem with mailcow? What is it doing or not doing? What’s in the log?
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:
2 acronyms in this thread; the most compressed thread commented on today has 5 acronyms.
[Thread #219 for this comm, first seen 7th Apr 2026, 12:00] [FAQ] [Full list] [Contact] [Source code]