Quantcast
Viewing all articles
Browse latest Browse all 4447

Ubuntu server 22.04 after setting up static ip-address i cant ping deafult gateway

im quite new to linux and I have tried to set a static ip-address on my ubuntu server 22.04. This is what the /etc/netplan/00-config looks like.

network:  version: 2  renderer: networkd  ethernets:    enp2s0:      addresses:        - 100.72.194.68/18      nameservers:        addresses: [8.8.8.8,8.8.4.4]     routes:        - to: default         via: 100.72.192.1

I am able to ping the ubuntu server from:Computer A 100.72.193.126Computer B 100.72.233.67

I can also ssh from computer A

The ubuntu server is unable to ping the router default gateway i just get:

From 100.72.194.68 icmp_seq=1 Destination Host Unreachable

What should i do?

EDIT 1:

I have checked that that /etc/ufw/before.rules have this rule:

-A ufw-before-forward -p icmp --icmp-type echo-request -j ACCEPT

Computer A and computer B can both ping the gw 100.72.192.1

Also i now the indentation looks wrong(probably became so when i copyed it over from the ubuntu server) but netplan accepts it so its probably right.

EDIT 2:Here are the results when i do ip route:

default via 100.72.192.1 dev enp2s0 proto static100.72.192.0/18 dev enp2s0 proto kernel scope link src 100.72.194.68172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown172.18.0.0/16 dev br-c8bbea4533e3 proto kernel scope link src 172.18.0.1172.27.224.0/23 dev as0t0 proto kernel scope link src 172.27.224.1172.27.226.0/23 dev as0t1 proto kernel scope link src 172.27.226.1172.27.228.0/23 dev as0t2 proto kernel scope link src 172.27.228.1172.27.230.0/23 dev as0t3 proto kernel scope link src 172.27.230.1172.27.232.0/23 dev as0t4 proto kernel scope link src 172.27.232.1172.27.234.0/23 dev as0t5 proto kernel scope link src 172.27.234.1172.27.236.0/23 dev as0t6 proto kernel scope link src 172.27.236.1172.27.238.0/23 dev as0t7 proto kernel scope link src 172.27.238.1

Here are the results when i do ip addr:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00    inet 127.0.0.1/8 scope host lo       valid_lft forever preferred_lft forever    inet6 ::1/128 scope host       valid_lft forever preferred_lft forever2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000    link/ether 98:ee:cb:5e:e4:21 brd ff:ff:ff:ff:ff:ff    inet 100.72.194.68/18 brd 100.72.255.255 scope global enp2s0       valid_lft forever preferred_lft forever    inet6 fe80::9aee:cbff:fe5e:e421/64 scope link       valid_lft forever preferred_lft forev

er


Viewing all articles
Browse latest Browse all 4447

Trending Articles