Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HELP] tproxy make network failed #67

Open
spencercjh opened this issue Aug 16, 2024 · 5 comments
Open

[HELP] tproxy make network failed #67

spencercjh opened this issue Aug 16, 2024 · 5 comments

Comments

@spencercjh
Copy link

spencercjh commented Aug 16, 2024

Here is my cfg file.

proxy_ports: [ 8000 ]
rules: # option rule vec
  - target: Request # Request or Response.
    # Stand for target packet to select & take actions.
    # If target is Response & selecting request info such as method or path ,
    # proxy will select request and take actions on Response.
    selector:
      path: /test # option Match path of `Uri` with wildcard matches. Using [wildcard matches](https://www.wikiwand.com/en/Matching_wildcards).
      #    abc://username:[email protected]:123/path/data?key=value&key2=value2#fragid1
      #                                           |--------|
      #                                               |
      #                                             path
      method: GET # option string
      port: 8000
    actions:
      delay: 2s # option Duration

There is a hello-world python server running on 8000 port.

image

Why is my ssh connection to this machine affected when I start the chaos-tproxy? I can't ssh to the instance until I reboot.

23acd1fc1c6ef4be9465c48974041076

I never saw logs after Uds listener listening on xxx because the ssh connection was closed...

Also I can't access the http server on port 8000 anymore.

@spencercjh spencercjh changed the title [HELP] tproxy make sshd failed [HELP] tproxy make network failed Aug 16, 2024
@spencercjh
Copy link
Author

中文版本:

我的预期是 chaos-tproxy 对 8000 端口的 GET /test 请求做 delay2s 的故障注入。但我发现 setenv_bridge 方法会把整台机器的网络给搞坏了,导致我无法再 ssh 连上它,8000 端口的服务也不可达了。

可能会是什么样的问题呢?

@Hexilee
Copy link
Member

Hexilee commented Aug 18, 2024

It's likely the chaos-tproxy exits by accident (not graceful shutdown), please check the status and logs by connecting to the physical machine.

@spencercjh
Copy link
Author

I successfully ran chaos-tproxy on a brand new Debian VM running by vmware fusion and everything worked fine.

image

Thanks for your reply.

@spencercjh
Copy link
Author

我为代码增加了更多的日志,并且使用 nohup 执行并将日志输出到文件中。发现了以下问题。

image

arp 包发送失败导致机器脱网,似乎是个非常合理的解释?

@Hexilee

@spencercjh spencercjh reopened this Sep 13, 2024
@spencercjh
Copy link
Author

I added more logging to the code and used nohup to execute and output the logs to a file. The following problem was found.

image

An arp packet sending failure causing the machine to disappear in the LAN seems like a perfectly reasonable explanation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants