Docker Community Forums

Share and learn in the Docker community.

Two networks in one host for simulation purpose


(Smile0987654321) #1

Hello,

I’m new to Docker and require help to understand if this is achievable.

So, I need to test/simulate the following:

  • Two fictional companies abc_dot_com and xyz_dot_com
  • abc_dot_com’s network consists of a web server, a customized mail server, firewall, and routers
  • xyz_dot_com’s network consists of a web server, a mail server, firewall, and routers
  • abc_dot_com will send email to xyz_dot_com

If this is can be done with Docker just by using 1 host (my personal laptop), can anyone give me pointer(s) on how to achieve this?

Any help is appreciated. Thank you.


(Sam) #2

don’t use windows as the host platform. SO much easier on a unix of some sort.

then use the docker-compose app (separate download)
it supports creating a logical network and putting the apps (containers) on it fairly easily.

not sure ‘routers’ are a thing you would emulate…


(David Maze) #3

I feel like Docker doesn’t give you a whole lot of help on doing this: to really make it work with Docker, you need to know enough about Linux networking in general that you don’t need Docker to set it up. That’s especially true when both isolated networks have their own firewalls.

If you already understand IP routing, what a router is, where a router would fit in this diagram, how you’d build a router on Linux, how these networks connect together, what DNS is, what a DNS MX record is, and how you’d configure the various routers and firewalls…yes, you probably could use Docker as a base layer. If you don’t already have that footing, adding Docker as an additional component to the mix and immediately needing to break its standard networking setup won’t make your task any easier.