I am trying to configure a new Alpine server, and I have some basic knowledge of networking & Linux only.
Everything works seamlessly if I use the default configs with DHCP, but breaks when I try to use a static IP config. I have to configure adguard home and a few apps on this system, every day
By default, the network config with DHCP gives a dynamic IP like 192.168.68.110
I changed the config using nano /etc/network/interfaces
and below are my config samples:
Default config had:
auto eth0
iface eth0 inet dhcp
My new config is:
auto eth0
iface eth0 inet static
address 192.168.10.1
netmask 255.255.0.0
gateway 192.168.29.1
If I do an ifconfig I get the below:
eth0 Link encap:Ethernet HWaddr XXXXXXXX
inet addr:192.168.10.1 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::e65f:1ff:fe31:9e45/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3826 errors:0 dropped:87 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:367860 (359.2 KiB) TX bytes:516 (516.0 B)
The output for ip addr
is
inet 192.168.10.1/24 scope global eth0
valid_lft forever preferred_lft forever
But I am even not able to ping the machine with a new config from 192.168.68.103
machine.