goreplay icon indicating copy to clipboard operation
goreplay copied to clipboard

Gor not working with VIP interfaces like dummy

Open vgallissot opened this issue 10 years ago • 11 comments

Hi,

I'm trying to capture traffic on a dummy interface and unfortunately gor doesn't capture anything. I have one Real IP on which multiple Virtual IPs are mounted with the dummy kernel module. All my traffic is comming onto VIPs and nothing on RIP. I have 200Mb/s traffic on those VIPs. Current Version: v0.15.1

I'm using: gor -verbose -input-raw :80 -output-http "http://myappip"

Gor is stuck on : [DEBUG][PID 5373][1476791429353982960][1476791429353.982910ms] Listening for traffic on: :80

Thank you in advance for your answer

vgallissot avatar Oct 18 '16 11:10 vgallissot

Hi, sorry for late response.

So, there are few potential places where it can broke. Do your dummy interfaces have IP's? It may break in this section when generate BPF rules: https://github.com/buger/gor/blob/master/raw_socket_listener/listener.go#L335-L354 Make sense to add some debugging there.

Also worth noticing that Gor use same library as tcpdump, can you confirm that tcpdump works in your case? This may help http://unix.stackexchange.com/questions/122468/how-does-one-capture-traffic-on-virtual-interfaces

If tcpdump works for you, can you record some traffic for me and send me pcap file (you can do it in private "[email protected]"). Worth noticing that I do not really need data packets, even headers will be enough.

Thank you!

buger avatar Oct 23 '16 05:10 buger

Hi,

Sorry I totally missed your answer. I'm closing this issue since I never faced the problem again.

Vincent

vgallissot avatar May 30 '17 08:05 vgallissot

👌🏻 On Вт, 30 мая 2017 г. at 11:10, vgallissot [email protected] wrote:

Hi,

Sorry I totally missed your answer.

I'm closing this issue since I never faced the problem again.

Vincent

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/buger/goreplay/issues/374#issuecomment-304806210, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA2uQOajXiaoESVxRMUnDt5bi-dJq9Gks5r-88OgaJpZM4KZs9d .

buger avatar May 30 '17 08:05 buger

I know that this is an old thread, but I am having this same/similar issue on a Windows Server 2012 running version 0.16.1 of GoReplay.

My incoming HTTP traffic is being routed to a virtual IP because my messaging system is mirrored with active and passive members hosted on different IPs. Unfortunately, GoReply does not see the traffic coming across the VIP. WireShark of course does, so there must be a way :-)

When I run: goreplay input-raw :5556 -output-stdout I see it open the first device for the backup network and the first device for the public network. The VIP with the message traffic is also listed in the public network, but it seems that GoReplay is filtering this device out.

Is there a way I can configure to not filter in this fashion?

  • use the physical address (so picking up all of the Public IP addresses) or
  • or take an IP address with the port?

Thanks, Cheri

cherimckeown avatar Feb 27 '18 20:02 cherimckeown

sorry by "public network" I mean "PUBLIC Ethernet adapter"

cherimckeown avatar Feb 27 '18 20:02 cherimckeown

Try this binary pls https://github.com/buger/goreplay/issues/440

buger avatar Feb 28 '18 08:02 buger

Hi,

I have same issue on Linux systems.

I have many vhosts that listen on dummy interface. When I use tcpdump or ngrep I can see requests

tcpdump -i any port 80 -v
16:27:35.038063 ethertype IPv4, IP (tos 0x0, ttl 64, id 45345, offset 0, flags [DF], proto TCP (6), length 510)
   my-pretty-server.org.40419 > my-public-ip.http: Flags [P.], cksum 0xd670 (incorrect -> 0xc72e), seq 0:458, ack 1, win 265, options [nop,nop,TS val 691077357 ecr 3980917476], length 458: HTTP, length: 458
    GET /path/to/my/pretty/app HTTP/1.1
    Host: my-pretty-app.org
    X-Real-IP: x-real-ip
    X-Forwarded-For: x-real-ip
    X-Forwarded-By: x-forwarded-by-ip
    X-Forwarded-Proto: https
    User-Agent: UA
    Content-Type: application/x-www-form-urlencoded
    
16:27:35.038066 ethertype IPv4, IP (tos 0x0, ttl 64, id 45345, offset 0, flags [DF], proto TCP (6), length 510)
   my-pretty-server.org.40419 > my-public-ip.http: Flags [P.], cksum 0xd670 (incorrect -> 0xc72e), seq 0:458, ack 1, win 265, options [nop,nop,TS val 691077357 ecr 3980917476], length 458: HTTP, length: 458
    GET /path/to/my/pretty/app HTTP/1.1
    Host: my-pretty-app.org
    X-Real-IP: x-real-ip
    X-Forwarded-For: x-real-ip
    X-Forwarded-By: x-forwarded-by-ip
    X-Forwarded-Proto: https
    User-Agent: UA
    Content-Type: application/x-www-form-urlencoded

When I run gor, I just see health checks requests sent on real-IP…

./goreplay --input-raw :80 --output-stdout
Version: 0.16.1

Any idea about this case ?

Thank you ! :)

vgnx avatar Dec 13 '18 16:12 vgnx

By default, GoReplay tries to build BPF rule which includes interface name.

Try adding following option: --input-raw-bpf-filter "port 80"

And this binaries too gor_DEV-1543578245_mac.tar.gz gor_DEV-1543578204_x64.tar.gz

buger avatar Dec 13 '18 19:12 buger

Thank you for answer.

I just test your binary with the --input-raw-bpf-filter "port 80" and it works fine for me. :ok_hand:

vgnx avatar Dec 14 '18 08:12 vgnx

hi, I am having the same issue. I am sending traffic to VIP but then the traffic is not getting recorded by goreplay. I have goreplay version 0.16.1

I see the following error ./goreplay --input-raw :80 --input-raw-bpf-filter "port 80" --output-stdout flag provided but not defined: -input-raw-bpf-filter @buger : can you let me know what I am missing. Thank you.

siri2020p avatar May 02 '19 20:05 siri2020p

Pls used recently released 1.0 version

чт, 2 мая 2019 г. в 23:32, siri2020p [email protected]:

hi, I am having the same issue. I am sending traffic to VIP but then the traffic is not getting recorded by goreplay. I have goreplay version 0.16.1

I see the following error ./goreplay --input-raw :80 --input-raw-bpf-filter "port 80" --output-stdout flag provided but not defined: -input-raw-bpf-filter Can anyone help.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/buger/goreplay/issues/374#issuecomment-488822148, or mute the thread https://github.com/notifications/unsubscribe-auth/AAADNOLS3TLDUIJFL5QMNOTPTNFVVANCNFSM4CTGZ5OQ .

-- Sincerely yours, Leonid Bugaev https://goreplay.org - test your system with real data @buger https://twitter.com/buger - me on twitter

buger avatar May 03 '19 06:05 buger