Page MenuHomeVyOS Platform

Dynamic ipv4 interface list.
Open, Requires assessmentPublicFEATURE REQUEST

Description

Ability to have a list (ipset) of dynamic IP addresses assigned via DHCP/PPPoE etc.
With this list, we will be able to improve the ability of flexible configurations.

It will be useful for firewall/PBR/NAT/port_forwarding features.

As one example:

Router main receives a DHCP address on eth4 from ISP.
This address is associated with the DynDNS site record.
Clients from the "internal network" should go to the external address/port 80 of the main router and redirect to the site located on the service device (192.168.68.101).

vyos@main# set nat destination rule 200 destination 
Possible completions:
   address      Destination IP address, subnet, or range
   port         Destination port

We can't use the IP address because it's a dynamic address that we don't know in advance.
We can't use only port 80 because all packets will be forwarded.

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)

Event Timeline

Viacheslav updated the task description. (Show Details)Apr 1 2020, 3:56 PM
Dmitry added a subscriber: Dmitry.Apr 1 2020, 4:04 PM

One question, I don't understand why we can't use only port 80 without this dynamic WAN IP address. In any case, you have inbound interface and port, I think this will be enough.

@Dmitry

set nat destination rule 102 destination port '80'
set nat destination rule 102 inbound-interface 'eth2'
set nat destination rule 102 protocol 'tcp'
set nat destination rule 102 translation address '192.168.68.101'
set nat destination rule 102 translation port '80'

How will internal clients gain access to external sites if we forward all packets with dst port 80?
This is just one example.

Dmitry added a comment.Apr 1 2020, 4:36 PM

Ok, as a workaround you can you.

set nat destination rule 102 source address !192.168.68.0/24
pasik added a subscriber: pasik.Apr 2 2020, 3:35 PM
ronie added a subscriber: ronie.Aug 17 2020, 2:48 PM