Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8422705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:31:50+00:00 2026-06-10T03:31:50+00:00

Does Scapy bypass Dummynet (IPFW in general)? It really looks like it does. I’m

  • 0

Does Scapy bypass Dummynet (IPFW in general)?

It really looks like it does. I’m adding a large extra delay to each outgoing and incoming packet, and everything slows down apart from packets sent with Scapy.

$ ipfw add pipe 1 from any to any
$ ipfw pipe 1 config delay 500ms
$ ping www.google.com
PING www.l.google.com (173.194.34.18) 56(84) bytes of data.
64 bytes from par03s02-in-f18.1e100.net (173.194.34.18): icmp_req=1 ttl=54 time=1011 ms
64 bytes from par03s02-in-f18.1e100.net (173.194.34.18): icmp_req=2 ttl=54 time=1010 ms

So it seems OK. But as soon as I send packets with Scapy, here’s what happens:

>>> from scapy.all import *
>>> p = IP(dst="www.google.com", ttl=1) / TCP(sport=222, dport=2999)
>>> ans,unans = sr(p*3)
>>> ans[0][1].time - ans[0][0].sent_time
0.0002701282501220703  #usual value for such RTT

Is there any way to force it to pass through dummynet?

EDIT If only I had another machine at my disposal, I could use dummynet there and direct all my traffic to it, before it gets into the Internet. I would prefer to do everything locally, though.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:31:51+00:00Added an answer on June 10, 2026 at 3:31 am

    The author of Scapy replied to me in Scapy’s mailing list:

    Try the same solution as for this question:
    http://trac.secdev.org/scapy/wiki/FAQ#Icantping127.0.0.1.Scapydoesnotworkwith127.0.0.1orontheloopbackinterface
    (using raw sockets)

    It worked! Here’s the paragraph from the above link :

    I can’t ping 127.0.0.1. Scapy does not work with 127.0.0.1 or on theloopback interface

    The loopback interface is a very special interface. Packets going
    through it are not really assembled and dissassembled. The kernel
    routes the packet to its destination while it is still stored an
    internal structure. What you see with tcpdump -i lo is only a fake to
    make you think everything is normal. The kernel is not aware of what
    Scapy is doing behind his back, so what you see on the loopback
    interface is also a fake. Except this one did not come from a local
    structure. Thus the kernel will never receive it.

    In order to speak to local applications, you need to build your
    packets one layer upper, using a PF_INET/SOCK_RAW socket instead of a
    PF_PACKET/SOCK_RAW (or its equivalent on other systems than Linux) :

    >>> conf.L3socket
    <class __main__.L3PacketSocket at 0xb7bdf5fc>
    >>> conf.L3socket=L3RawSocket
    >>> sr1(IP(dst="127.0.0.1")/ICMP())
    <IP  version=4L ihl=5L tos=0x0 len=28 id=40953 flags= frag=0L ttl=64 proto=ICMP chksum=0xdce5 src=127.0.0.1 dst=127.0.0.1 options='' |<ICMP  type=echo-reply code=0 chksum=0xffff id=0x0 seq=0x0 |>>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm programming an application in Python/Scapy that behaves like wireless 802.1X supplicant. I want
I'd like to use principal component analysis (PCA) for dimensionality reduction. Does numpy or
What does the smode of scipy.optimize 'Positive directional derivative for linesearch' mean? for example
Does anyone know if there is a way to generate different code in the
Does COUNT(*) have any significant impact for MySQL performance if query already has GROUP
Does anyone have a translate function for x/y positions after rotation in javascript? for
Does anyone know of a free tool, similar to what is built into Visual
Does anyone know why UsernameExists wont return True. I must have my syntax messed
Does anyone out there know how to integrate ContentFlow ( http://www.jacksasylum.eu/ContentFlow ) and Lightbox2
Does the following psuedo code accomplish my goal of cleaning up after myself when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.