Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


I'm having problems setting up a Private Networking with Hosthatch's VPS
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

I'm having problems setting up a Private Networking with Hosthatch's VPS

Hi, I'm having some problems setting up a private network and I need some help.
I refer to the official documentation provided: https://docs.hosthatch.com/networking/#private-networking
Both servers are on Debian 11 (Chicago), and after machine A enters
ip -o link | grep 00:22
it shows

3: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq state UP mode DEFAULT group default qlen 1000\    link/ether 00:22:f9:a5:80:79 brd ff:ff:ff:ff:ff:ff\    altname enp0s4

After entering ip -o link | grep 00:22 on machine B, it shows

3: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq state UP mode DEFAULT group default qlen 1000\ link/ether 00:22:f9:a5:80:79 brd ff:ff: ff:ff:ff:ff\ altname enp0s4

How do I change the contents of the /etc/network/interfaces.d/90-private file?
The documentation suggests the following

iface eth1 inet6 static
     address 192.168.10.1/24

I tried to change eth1 to ens4, but it failed. After restarting the network prompt:

Job for networking.service failed because the control process exited with error code.

After changing back to eth1, restarting the network took a long time but no error was reported. I would like to know if what I did was correct.

The last question, after I change this, can I know the internal IP of machine A and machine B. I want to use NFS to connect two VPS, transfer some data to each other, which needs to use their two internal IPs, I can not be sure after filling in the address 192.168.10.1/24, what is the specific internal IP of these two machines?

I hope you guys can help me, thank you very much!

Comments

  • Should be inet not intet6 for IPv4.

    iface ens4 inet static
    address 192.168.10.1/24

    Thanked by 2GuGuGee yoursunny
  • @luckypenguin said:
    Should be inet not intet6 for IPv4.

    iface ens4 inet static
    address 192.168.10.1/24

    Thank you very much for your help!

    I reconfigured it and after restarting the network everything works fine now.

    By the way, after this configuration, can I get a specific Internal IP for this VPS? I want to transfer files between two machines via nfs and I need specific Internal IP addresses for both VPS. :'(

  • Use any RFC1918 IP range if it's a private internal network.
    What's wrong with 192.168.10.1 and 192.168.10.2?

  • @luckypenguin said:
    Use any RFC1918 IP range if it's a private internal network.
    What's wrong with 192.168.10.1 and 192.168.10.2?

    Oh, I think I got it, I should set up the three VPS in turn as follows

    iface ens4 inet6 static
        address 192.168.10.1/24
    

    the second one,

    iface ens4 inet6 static
        address 192.168.10.2/24
    

    the third one,

    iface ens4 inet6 static
        address 192.168.10.3/24
    

    Thank you so much!

  • @luckypenguin said:
    Use any RFC1918 IP range if it's a private internal network.
    What's wrong with 192.168.10.1 and 192.168.10.2?

    I've made it! Thanks again for your help!

    The NFS Mount reference is as follows
    https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-20-04

  • @luckypenguin said:
    Should be inet not intet6 for IPv4.

    iface ens4 inet static
    address 192.168.10.1/24

    I'm fed up, the previous configuration has worked, I'm going to test if the VPS will be mounted automatically after restarting, then after restarting the VPS, the private network settings are still there, but they don't work, I wonder if hosthatch hasn't fully developed this feature yet I'm considering if I should change the VPS provider.

  • You didn't specify anything about auto start.
    Just add "auto" to your config.

    auto iface ens4 inet static
    address 192.168.10.1/24

  • @luckypenguin said:
    You didn't specify anything about auto start.
    Just add "auto" to your config.

    auto iface ens4 inet static
    address 192.168.10.1/24

    After the modification, I restarted the network and the system reported an error that


  • @luckypenguin said:
    You didn't specify anything about auto start.
    Just add "auto" to your config.

    auto iface ens4 inet static
    address 192.168.10.1/24

  • My bad, should be a separate line,

    auto ens4
    iface ens4 inet static
    address 192.168.10.1/24

    Thanked by 1GuGuGee
  • @luckypenguin said:
    My bad, should be a separate line,

    auto ens4
    iface ens4 inet static
    address 192.168.10.1/24

    Thank you very much for your help, I just tested and rebooted and everything is fine!

Sign In or Register to comment.