Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

Application sends a Packet, but it should be dropped by the IP.

HI,

I want to simulate the following situation.

My Application sends a packet, but the ip packet should be dropped by the ip layer.
Is there any way on Linux using ifconfig command or any other to drop a packet intentioanlly.
0
srini_kandimalla
Asked:
srini_kandimalla
2 Solutions
 
svsCommented:
A firewall (in Linux -- netfilter) is good at dropping packets.
0
 
Duncan RoeSoftware DeveloperCommented:
Why do you want to do this? I only ask in case there might be a simpler way to achieve your goal.
For instance, if you are developing a user-level program which does its own session control over UDP, you could use the gdb debugger to simulate packet loss.
0
 
pillaisuderCommented:
use firewall(iptables)
set the iptables default policy as drop or reject
another query is tell me which exact application packet to drop?
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now