# Dumping flows in ng_nat (libalias)



## pprocacci (Sep 16, 2021)

Hey everyone,

I'm testing ng_nat for a replacement of ipfw+nat that I had in mind.

```
# uname -a
FreeBSD netgraph0.myhome 13.0-RELEASE FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Apr  9 04:24:09 UTC 2021     [EMAIL]root@releng1.nyi.freebsd.org[/EMAIL]:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64
```


```
# ngctl show vtnet0:
  Name: vtnet0          Type: ether           ID: 0000000e   Num hooks: 2
  Local hook      Peer name       Peer type    Peer ID         Peer hook
  ----------      ---------       ---------    -------         ---------
  upper           vtnet0_NAT      nat          0000005f        out
  lower           vtnet0_NAT      nat          0000005f        in
```


```
# ngctl msg vtnet0_NAT: libaliasinfo
Rec'd response "libaliasinfo" (12) from "[5f]:":
Args:   { tcpLinkCount=1 }
```


```
# netstat -f ng
netstat: Error reading symbols from ng_socket.ko
netstat: Error reading symbols from ng_socket.ko
```

With the above, I'm able to see I have an active tcp entry (my ssh session), but what I'm really interested in seeing is a dump of all the flows.  The manpage of libalias nor ng_nat mention any sort of thing.
Is there something simply not mentioned somewhere that can be used to get a dump of all the flows?

Thanks in advance.


----------

