If you need to change your server IP for some reason, follow the procedure:
- Obtain your
$server_ip
,$netmask
and$gateway_ip
(and get or calculate your$network
) - Make the appropriate changes in
/etc/initramfs-tools/initramfs.conf
(see the format) - Update
initramfs
- Make the appropriate changes in
/etc/network/interfaces
- Reboot and verify your settings.
-
Directly connect your laptop to your server via ethernet.
-
Make your laptop a gateway with
make-gateway
:sudo ./make-gateway --wan wlp2s0 --lan eth0 --ip $gateway_ip
-
Create a route to your server:
sudo ip route add $network/$netmask dev eth0
-
Add your
server_ip
to/etc/hosts
:server_ip example.com
-
Try to connect over ssh without using an IP.