Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.08 KB

changing-server-ip.md

File metadata and controls

33 lines (22 loc) · 1.08 KB

Changing Server IP

If you need to change your server IP for some reason, follow the procedure:

  1. Obtain your $server_ip, $netmask and $gateway_ip (and get or calculate your $network)
  2. Make the appropriate changes in /etc/initramfs-tools/initramfs.conf (see the format)
  3. Update initramfs
  4. Make the appropriate changes in /etc/network/interfaces
  5. Reboot and verify your settings.

Verification

  1. Directly connect your laptop to your server via ethernet.

  2. Make your laptop a gateway with make-gateway:

    sudo ./make-gateway --wan wlp2s0 --lan eth0 --ip $gateway_ip
    
  3. Create a route to your server:

    sudo ip route add $network/$netmask dev eth0
    
  4. Add your server_ip to /etc/hosts:

    server_ip     example.com
    
  5. Try to connect over ssh without using an IP.