Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T6687: add fqdn support to nat rules. (backport #4024) #4113

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Sep 30, 2024

Change Summary

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

nat

Proposed changes

How to test

vyos@fqdn-nat# run show config comm | grep nat
set nat destination rule 10 destination fqdn 'vyos.dev'
set nat destination rule 10 inbound-interface name 'eth2'
set nat destination rule 10 translation address '198.51.100.55'
set system host-name 'fqdn-nat'
[edit]
vyos@fqdn-nat# sudo nft -s list table ip vyos_nat
table ip vyos_nat {
        set FQDN_nat_destination_10_d {
                type ipv4_addr
                flags interval
                elements = { 104.18.2.133, 104.18.3.133 }
        }

        chain PREROUTING {
                type nat hook prerouting priority dstnat; policy accept;
                counter jump VYOS_PRE_DNAT_HOOK
                iifname "eth2" ip daddr @FQDN_nat_destination_10_d counter dnat to 198.51.100.55 comment "DST-NAT-10"
        }

        chain POSTROUTING {
                type nat hook postrouting priority srcnat; policy accept;
                counter jump VYOS_PRE_SNAT_HOOK
        }

        chain VYOS_PRE_DNAT_HOOK {
                return
        }

        chain VYOS_PRE_SNAT_HOOK {
                return
        }
}
[edit]
vyos@fqdn-nat# sudo ps aux | grep vyos-domain
root        2928  0.6  5.1  64160 51124 ?        Ss   17:56   0:00 /usr/bin/python3 -u /usr/libexec/vyos/vyos-domain-resolver.py
vyos        3134  0.0  0.2   6332  2048 ttyS0    S+   17:57   0:00 grep vyos-domain
[edit]
vyos@fqdn-nat# 

Smoketest result

  • test_firewall.py --> OK
  • test_nat.py --> OK

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

This is an automatic backport of pull request #4024 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner September 30, 2024 14:50
@mergify mergify bot added the conflicts label Sep 30, 2024
@mergify mergify bot requested review from dmbaturin, sarthurdev, zdc, jestabro, c-po and fett0 and removed request for a team September 30, 2024 14:50
@mergify mergify bot mentioned this pull request Sep 30, 2024
12 tasks
Copy link

github-actions bot commented Sep 30, 2024

👍
No issues in PR Title / Commit Title

@c-po c-po enabled auto-merge September 30, 2024 14:58
@c-po c-po force-pushed the mergify/bp/circinus/pr-4024 branch from 99feb7a to 5b38e42 Compare September 30, 2024 15:02
@vyos vyos deleted a comment from mergify bot Sep 30, 2024
Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

@c-po c-po force-pushed the mergify/bp/circinus/pr-4024 branch from 5b38e42 to 8dcb042 Compare September 30, 2024 15:26
@c-po c-po merged commit e663fc4 into circinus Sep 30, 2024
9 checks passed
@sever-sever sever-sever deleted the mergify/bp/circinus/pr-4024 branch October 17, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants