-
-
Save haproxytechblog/29ea04c3647b02f4aa5d468455b7baf2 to your computer and use it in GitHub Desktop.
Extract Insightful Data From Proxy Protocol Packets Blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tshark -disable-protocol tls -Y proxy.src.ipv4 -V |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tshark -r FILENAME -Y proxy.src.ipv4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tshark -f "tcp port not 22" -a "duration:5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --haproxy-protocol http://<your load balancer>/... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Trying ::1:80... | |
* connect to ::1 port 80 failed: Connection refused | |
* Trying 127.0.0.1:80... | |
* Connected to localhost (127.0.0.1) port 80 (#0) | |
> PROXY TCP4 127.0.0.1 127.0.0.1 53606 80 | |
> GET / HTTP/1.1 | |
> Host: localhost | |
> User-Agent: curl/7.74.0 | |
> Accept: */* | |
> | |
* Mark bundle as not supporting multiuse | |
< HTTP/1.1 302 Found | |
< content-length: 0 | |
< location: /hapee-stats | |
< cache-control: no-cache | |
< | |
* Connection #0 to host localhost left intact |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install wireshark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install tshark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ubuntu@bk:/etc/hapee-2.6# tshark -Y proxy.src.ipv4 -V | |
... | |
PROXY Protocol | |
Magic: 0d0a0d0a000d0a515549540a | |
0010 .... = Version: 2 | |
.... 0001 = Command: 1 | |
[Version: 2] | |
Address Family Protocol: TCP over IPv4 (0x11) | |
0001 .... = Address Family: IPv4 (0x1) | |
.... 0001 = Protocol: 0x1 | |
Length: 12 | |
Source Address: 192.168.64.1 | |
Destination Address: 192.168.64.120 | |
Source Port: 49344 | |
Destination Port: 8081 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tshark -r FILENAME -Y proxy.src.ipv4 -V |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment