this post was submitted on 14 Jun 2023
3 points (100.0% liked)
Self Hosted - Self-hosting your services.
506 readers
2 users here now
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules
- No harassment
- crossposts from c/Open Source & c/docker & related may be allowed, depending on context
- Video Promoting is allowed if is within the topic.
- No spamming.
- Stay friendly.
- Follow the lemmy.ml instance rules.
- Tag your post. (Read under)
Important
Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!
- Lemmy doesn't have tags yet, so mark it with [Question], [Help], [Project], [Other], [Promoting] or other you may think is appropriate.
Cross-posting
- !everything_git@lemmy.ml is allowed!
- !docker@lemmy.ml is allowed!
- !portainer@lemmy.ml is allowed!
- !fediverse@lemmy.ml is allowed if topic has to do with selfhosting.
- !selfhosted@lemmy.ml is allowed!
If you see a rule-breaker please DM the mods!
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Chat GPT @ chat.openai.com's answer
Thank you for providing the details. Based on your requirements, you can achieve your goal by utilizing the Linux bridge functionality to create a software-level Layer 2 switch. Here's an outline of the steps involved:
Install the necessary software: Ensure that the
bridge-utils
package is installed on your Linux machine. You can typically install it using the package manager specific to your distribution. For example, on Ubuntu or Debian, you can runsudo apt-get install bridge-utils
.Identify your physical network interface: Determine the name of your WiFi network interface that is connected to the ISP router. You can use the
ip link
command to list the available network interfaces. Look for the interface name associated with your WiFi connection (e.g.,wlan0
).Disable network management on the physical interface: To prevent network managers from managing the physical interface directly, you'll want to disable their control. This step may vary depending on your specific network manager. For example, if you're using NetworkManager, you can edit the configuration file associated with your WiFi connection (usually located in
/etc/NetworkManager/system-connections/
) and setmanaged=false
. Alternatively, you can stop or disable the network manager service temporarily.Create a bridge interface: Create a Linux bridge interface using the
brctl
command. For example, you can runsudo brctl addbr br0
to create a bridge namedbr0
.Add the physical interface to the bridge: Add your WiFi interface to the bridge using the
brctl addif
command. For example, runsudo brctl addif br0 wlan0
to addwlan0
to the bridge.Configure the bridge interface: Assign an IP address to the bridge interface (
br0
) by configuring it in the network configuration files. The specific file to edit depends on your Linux distribution. For example, on Ubuntu or Debian, you can edit/etc/network/interfaces
and add the following lines:Alternatively, you can use network management tools like NetworkManager or systemd-networkd to configure the bridge interface.
Configure the virtual machines and containers: Configure your virtual machines, Docker containers, and systemd-containers to use the bridge interface (
br0
) as their network interface. This configuration varies depending on the specific technology you are using. For example:br0
. Then, when creating or running Docker containers, connect them to this network.net-attach@.netdev
andnet-attach@.network
units to attach the container to the bridge interface (br0
). This can be done using thesystemctl
command and systemd network configuration files.With these steps, your virtual machines, Docker containers, and systemd-containers should be able to obtain IP addresses directly from your ISP router via the software-level Layer 2 switch created using the Linux bridge interface.
Please note that the specific commands and configuration files may vary depending on your Linux distribution and network management setup. Make sure to adapt the instructions accordingly. Additionally, be cautious when modifying network configurations as it can potentially impact your network connectivity.
I'll try doing this and update if it works for me.
This worked. Now I can have unlimited lightweight systemd containers, each with it's own globally routable public ipv6 address :)