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

Divert to different physical adapter #5

Open
viruzeno opened this issue Feb 17, 2022 · 3 comments
Open

Divert to different physical adapter #5

viruzeno opened this issue Feb 17, 2022 · 3 comments

Comments

@viruzeno
Copy link

I'm trying to divert all traffic from interface 1 to interface 2

Your readme states - Force redirected packets over a specific network interface.

What would the config for this look like?

I've tried variations like this (10.10.10.10) the IP of the other interface

icmp < 0.0.0.0 -> 10.10.10.10
icmp > 0.0.0.0 -> 10.10.10.10
tcp < 0.0.0.0 -> 10.10.10.10
tcp > 0.0.0.0 -> 10.10.10.10
udp < 0.0.0.0 -> 10.10.10.10
udp > 0.0.0.0 -> 10.10.10.10

It finds 4 of the 6 rules, but does not seem to do anything.

PS C:\Users\Administrator\Downloads\StreamDivert.x64> ./StreamDivert.exe config.txt
[*] Parsing config file...
[*] Parsed 3 inbound and 1 outbound relay entries.
[*] Starting packet diverters...
[*] InboundTCPDivertProxy(0:?) Start
[*] SocksProxyServer(0): Start
[*] SocksProxyServer(50162): Start completed
[*] InboundTCPDivertProxy(0:50161) Start
[*] InboundTCPDivertProxy(0:50161) tcp and ((tcp.SrcPort == 50161) or (tcp.SrcPort == 50162) or (tcp.DstPort == 0 and ipv6.SrcAddr 
== ffff:ffff::46f1:dc13:f77f:0))
[*] InboundUDPDivertProxy() Start
[*] InboundUDPDivertProxy() udp and ((udp.DstPort == 0 and ipv6.SrcAddr == ffff:ffff::46f1:dc13:f77f:0) or (udp.SrcPort == 41438 and 
ipv6.SrcAddr == ::))
[*] InboundICMPDivertProxy() Start
[*] InboundICMPDivertProxy() (icmp or icmpv6) and ((ipv6.SrcAddr == ::) or (ipv6.SrcAddr == ffff:ffff::46f1:dc13:f77f:0))
[*] OutboundDivertProxy() Start
[*] OutboundDivertProxy() (icmp or icmpv6)
@jellever
Copy link
Owner

Hi,

Currently it is only supported to intercept and force the traffic over another interface for specific streams. You would configure this like so:
tcp > 1.1.1.1 80 -> 1.1.1.1 80 force interface 9

This would intercept all tcp traffic going to external ip 1.1.1.1, destination port 80 (the tcp > 1.1.1.1 80 part) and change the destination address and port to 1.1.1.1 80 (the -> 1.1.1.1 80 part), and force the packets over interface number 9 (the force interface 9 part). You can inspect the network interfaces and their number by running stream divert:

StreamDivert.exe interfaces

@viruzeno
Copy link
Author

viruzeno commented Feb 17, 2022 via email

@zeltrax00
Copy link

Hi,

Currently it is only supported to intercept and force the traffic over another interface for specific streams. You would configure this like so: tcp > 1.1.1.1 80 -> 1.1.1.1 80 force interface 9

This would intercept all tcp traffic going to external ip 1.1.1.1, destination port 80 (the tcp > 1.1.1.1 80 part) and change the destination address and port to 1.1.1.1 80 (the -> 1.1.1.1 80 part), and force the packets over interface number 9 (the force interface 9 part). You can inspect the network interfaces and their number by running stream divert:

StreamDivert.exe interfaces

Can I divert UDP to other interfaces ? According to my testing, I can do it with TCP but not UDP

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

3 participants