Score:0

Iptables block ping from another ip

cn flag

I am a beginner in the field could you help me please

me : 192.168.15.13

user1 : 192.168.15.14

user2 : 192.168.15.12

I would like to block ping from user1 to user2 using iptables from my ip 192.168.15.13.

So I made this: iptables -t filter -A INPUT -p icmp -s 192.168.15.14 -d 192.168.15.12 -j DROP

But it doesn't work, in fact I don't even know if it's really possible to block ping from another ip.

thank you for helping me

viktor spett avatar
cn flag
I am sure, there are more qualified people to answer this question, but why don't you block ping in iptables on user 2 (192.168.15.12)? Maybe it would help to know what devices these actually are and why you need it to be "unpingable"?
user535733 avatar
cn flag
It's unclear why each user has a different IP address. That's not generally how Ubuntu works. Perhaps there is an element to the question that is missing? Or is each user on a different machine?
RHT9855 avatar
cn flag
yes its a different machine
Doug Smythies avatar
gn flag
What you are attempting to do is not possible.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.