Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwinger233 committed Nov 26, 2023
1 parent aa38138 commit 670c960
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,26 +69,18 @@ jobs:
cmd: |
chmod +x /host/skbdump/skbdump
- name: Test netns -> 1.1.1.1
- name: SNAT
uses: cilium/little-vm-helper@908ab1ff8a596a03cd5221a1f8602dc44c3f906d # v0.0.12
with:
provision: 'false'
cmd: |
sysctl net.ipv4.conf.all.proxy_arp=1
sysctl net.ipv4.conf.default.proxy_arp=1
set -ex
ip net a testns
ip l a testns-veth type veth peer name testns-peer
ip l s testns-peer up
ip l s testns-veth netns testns
ip net e testns ip l s testns-veth up
ip r a 10.0.0.1 dev testns-peer
ip net e testns ip a a 10.0.0.1 dev testns-veth
ip net e testns ip r a default dev testns-veth
iptables -t nat -I POSTROUTING 1 -d 1.1.1.1/32 -p tcp --dport 80 -o enp0s2 -j SNAT --to 10.0.0.6:23333
iptables -t filter --policy FORWARD ACCEPT
iptables -t nat -I POSTROUTING 1 -s 10.0.0.1/24 -o enp0s2 -j MASQUERADE
/host/skbdump/skbdump --oneshot -i any 'dst host 1.1.1.1 and tcp[tcpflags] = tcp-syn' 2>&1 1>/tmp/log | (read _; sleep 1; ip net e testns curl --connect-timeout 1 1.1.1.1 &>/dev/null || true)
/host/skbdump/skbdump --oneshot -i any -f nf_hook_slow 'dst host 1.1.1.1 and tcp[tcpflags] = tcp-syn' 2>&1 1>/tmp/log | (read _; curl --local-port 8888 1.1.1.1 &>/dev/null || true)
cat /tmp/log
cat /tmp/log | grep 'out@'
cat /tmp/log | grep -P 'nf_hook_slow@.*8888>80'
cat /tmp/log | grep -P 'nf_hook_slow+r@*23333>80'

0 comments on commit 670c960

Please sign in to comment.