[FIX] How to reset the firewall configuration in a persistent manner?


Internet works, ping which is for sure of an Android device does not. I believe it is an issue of the firewall programs.

$ ping
PING ( 56(84) bytes of data.
From icmp_seq=1 Destination Host Unreachable
From icmp_seq=2 Destination Host Unreachable
From icmp_seq=3 Destination Host Unreachable
From icmp_seq=4 Destination Host Unreachable
From icmp_seq=5 Destination Host Unreachable
From icmp_seq=6 Destination Host Unreachable
--- ping statistics ---
8 packets transmitted, 0 received, +6 errors, 100% packet loss, time 7147ms
pipe 3

I think the problem appeared when today I messed up with firewall-cmd and ufw.

I did this:

sudo firewall-cmd --zone=public --permanent --add-service=http

and the Internet did not work. Then, to undo:

sudo firewall-cmd --zone=public --permanent --remove-service=http

but the Internet was still not working.

But I did sudo ufw --force reset and then sudo ufw --force enable, then rebooted the laptop:

$ sudo ufw --force reset
Backing up 'user.rules' to '/etc/ufw/user.rules.20220304_134252'
Backing up 'before.rules' to '/etc/ufw/before.rules.20220304_134252'
Backing up 'after.rules' to '/etc/ufw/after.rules.20220304_134252'
Backing up 'user6.rules' to '/etc/ufw/user6.rules.20220304_134252'
Backing up 'before6.rules' to '/etc/ufw/before6.rules.20220304_134252'
Backing up 'after6.rules' to '/etc/ufw/after6.rules.20220304_134252'

But still the firewall rules are not reset. How can I reset the firewall rules?


sudo ufw status numbered
Statut: inactiv (Status: inactive)

If I disable/enable the firewall with sudo ufw --force with disable/enable the Internet works in both ways, but none of these commands make the ping towards the Android device work.

arp -a

? ( at 70:9f:2d:bc:3d:0c [ether] on enp1s0
tab-s6-al-utilizatorului-silviu ( at <incompletă> on enp1s0

ip -4 neigh dev enp1s0 lladdr 70:9f:2d:bc:3d:0c REACHABLE dev enp1s0  FAILED

Update 1

Relevant question: From icmp_seq=1 Destination Host Unreachable.

Update 2

I do not comprehend why arp -a shows the name of the device I am looking for if the device is not seen.

Screenshot of the device connected with the IP


Click Here to see answer

payam 7 months 2022-03-05T09:26:36+00:00 0 Answers 3 views

Leave an answer

By answering, you agree to the Terms of Service and Privacy Policy.