Page MenuHomeVyOS Platform

Migrate vyatta-nat-translations.pl to Python
Closed, ResolvedPublic

Description

The following Perl script needs a Python migration

https://github.com/vyos/vyatta-nat/blob/current/scripts/vyatta-nat-translations.pl
and should be placed here: https://github.com/vyos/vyos-1x/tree/current/src/op_mode

The output is as follows:

vyos@vyos:~$ show nat source translations | strip-private
Pre-NAT              Post-NAT             Prot  Timeout
xxx.xxx.33.164        xxx.xxx.192.202        tcp   72285
xxx.xxx.33.161        xxx.xxx.192.202        tcp   136553
xxx.xxx.33.164        xxx.xxx.192.202        tcp   72
xxx.xxx.36.40         xxx.xxx.192.202        udp   262
xxx.xxx.201.10        xxx.xxx.192.202        tcp   118
xxx.xxx.33.161        xxx.xxx.192.202        tcp   244450
xxx.xxx.33.161        xxx.xxx.192.202        tcp   136554
xxx.xxx.33.164        xxx.xxx.192.202        tcp   431995
xxx.xxx.33.161        xxx.xxx.192.202        tcp   136559
xxx.xxx.33.165        xxx.xxx.192.202        tcp   141720
xxx.xxx.33.165        xxx.xxx.192.202        tcp   214964
xxx.xxx.33.161        xxx.xxx.192.202        tcp   136537
xxx.xxx.33.164        xxx.xxx.192.202        tcp   431997
xxx.xxx.33.161        xxx.xxx.192.202        tcp   136554
xxx.xxx.35.23         xxx.xxx.192.202        tcp   431977
xxx.xxx.35.242        xxx.xxx.192.202        tcp   431620
xxx.xxx.33.161        xxx.xxx.192.202        tcp   216661
xxx.xxx.33.164        xxx.xxx.192.202        tcp   431980
xxx.xxx.33.161        xxx.xxx.192.202        tcp   216660
xxx.xxx.33.40         xxx.xxx.192.202        tcp   431997
xxx.xxx.33.164        xxx.xxx.192.202        tcp   431960
xxx.xxx.33.164:49408  xxx.xxx.192.202:1024   tcp   97238
xxx.xxx.33.164        xxx.xxx.192.202        tcp   431959
xxx.xxx.202.10        xxx.xxx.192.202        udp   201
xxx.xxx.202.10        xxx.xxx.192.202        udp   116
vyos@vyos:~$ show nat destination translations | strip-private
Pre-NAT              Post-NAT             Prot  Timeout
xxx.xxx.100.100       xxx.xxx.100.100       icmp  29
xxx.xxx.192.202        xxx.xxx.36.10         tcp   338243
xxx.xxx.192.202        xxx.xxx.36.10         tcp   338194
xxx.xxx.192.202        xxx.xxx.36.10         tcp   85
xxx.xxx.192.202        xxx.xxx.36.10         tcp   55
xxx.xxx.192.202        xxx.xxx.36.10         tcp   61
xxx.xxx.192.202        xxx.xxx.36.10         tcp   116
xxx.xxx.192.202        xxx.xxx.36.10         tcp   391797
xxx.xxx.192.202        xxx.xxx.36.10         tcp   299
xxx.xxx.192.202        xxx.xxx.36.10         tcp   338240
xxx.xxx.192.202        xxx.xxx.36.10         tcp   28
xxx.xxx.192.202        xxx.xxx.36.10         tcp   338216
xxx.xxx.192.202        xxx.xxx.36.10         tcp   338216
xxx.xxx.192.202        xxx.xxx.36.10         tcp   93

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Internal change (not visible to end users)

Event Timeline

c-po triaged this task as Normal priority.
c-po created this task.
c-po created this object in space S1 VyOS Public.
erkin set Issue type to Internal change (not visible to end users).Aug 30 2021, 6:13 AM
erkin removed a subscriber: Active contributors.