?
Solved

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

Posted on 2007-12-04
5
Medium Priority
?
256 Views
Last Modified: 2013-12-16
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
Comment
Question by:srini_kandimalla
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 9

Accepted Solution

by:
svs earned 1000 total points
ID: 20406083
A firewall (in Linux -- netfilter) is good at dropping packets.
0
 
LVL 35

Assisted Solution

by:Duncan Roe
Duncan Roe earned 1000 total points
ID: 20406553
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
 

Expert Comment

by:pillaisuder
ID: 20427446
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question