V
V
Vadim2021-10-24 20:08:58
linux
Vadim, 2021-10-24 20:08:58

How to extract packet redirects from IPTABLES?

Classic AWS Load Balance listens on worker instances on ports 30897 and 31049, tcp. The netstat command shows that kube-proxy is sitting on these ports.

tcp       0      0 :::31047                :::*                    LISTEN      3698/kube-proxy


The docker container - nginx-ingress-controller is running on the same machine. How can I find the IPTABLES rule that will show how packets are sent from these ports to nginx-ingress-controller?

iptables -S | grep 30897
This command does nothing.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Karabanov, 2021-10-24
@karabanov

this command does nothing!

It was you who got excited with the conclusion.
Because if you do not explicitly specify the table, the output will be from the filter table (in which, as you can see, yours is empty), if you want to see what is in the nat table or some other, you need to specify it:
iptables -S -t nat | grep 30897

A
Alexey Dmitriev, 2021-10-25
@SignFinder

iptables -nL or iptables-save

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question