Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set up NAT gateway for private Cloud Networks #947

Open
paulrogov opened this issue Sep 16, 2024 · 1 comment
Open

How to set up NAT gateway for private Cloud Networks #947

paulrogov opened this issue Sep 16, 2024 · 1 comment
Labels
Existing tutorial Changes on an existing tutorial

Comments

@paulrogov
Copy link

Problem

  1. Persistent configuration for Ubuntu 24.04 client servers (CX22 instance) does not work.
  2. There is not DNS config for Ubuntu client servers specified at all.

Reason

A Hetzner Ubuntu 24.04 CX22 has network interface named enp7s0, not ens10 mentioned in the current version of the document.

Suggested Fix

Tested with Ubuntu 24.04 CX22

  1. Change to enp7s0 (can be double-checked with ifconfig output)
$ nano /etc/systemd/network/10-enp7s0.network
[Match]
Name=enp7s0

[Network]
DHCP=yes
Gateway=10.0.0.1
$ reboot
  1. Add DNS config
$ nano /etc/systemd/resolved.conf
DNS=1.1.1.1 FallbackDNS=8.8.8.8 # Cloudflare and Google Fallback
$ sudo systemctl restart systemd-resolved
@paulrogov
Copy link
Author

paulrogov commented Sep 16, 2024

Optionally, you can use this cloud-init config for persistent config on Ubuntu 24.04 client servers.
This is in yaml format and should be specified when creating a new server instance (tested with Hetzner Ubuntu 24.04 CX22):

#cloud-config
write_files:
  - path: /etc/systemd/network/10-enp7s0.network
    content: |
      # Custom network configuration added by cloud-init
      [Match]
      Name=enp7s0

      [Network]
      DHCP=yes
      Gateway=10.0.0.1
    append: true

  - path: /etc/systemd/resolved.conf
    content: |
      # Custom network configuration added by cloud-init
      DNS=1.1.1.1 FallbackDNS=8.8.8.8 # Cloudflare and Google Fallback
    append: true

runcmd:
  - reboot

@svenja11 svenja11 added the Existing tutorial Changes on an existing tutorial label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Existing tutorial Changes on an existing tutorial
Projects
None yet
Development

No branches or pull requests

2 participants