freebox_port_forwarding (Resource)
Manages a port forwarding between a local network host and the Freebox Internet Gateway.
Note: To have access to the full port range, you need to enable the Full Stack IP (see the Freebox documentation (in French)).
Example
resource "freebox_port_forwarding" "example" {
enabled = true
ip_protocol = "udp"
target_ip = "192.168.1.255"
comment = "This is an example comment"
source_ip = "0.0.0.0"
port_range_start = 32443
port_range_end = 32443
target_port = 443
}
output "hostname" {
value = resource.freebox_port_forwarding.example.hostname
}
output "reachable" {
value = resource.freebox_port_forwarding.example.host.reachable
}
Schema
Required
enabled(Boolean) Status of the forwardingip_protocol(String) Protocol to handleport_range_start(Number) Start boundary of the port range to forward. The range is inclusive.target_ip(String) Local IP of the local port forwarding target
Optional
comment(String) Additional comment associated with the ruleport_range_end(Number) End boundary of the port range to forward. If not set, it will default to the same value asport_range_start.source_ip(String) Local IP of the local port forwarding target. If left unset or set to 0.0.0.0, the rule will apply to any incoming IPtarget_port(Number) The target port range to forward to. If not set, it will default to the same value asport_range_start. Only available for a range of 1 port.
Read-Only
host(Attributes) LAN host information (see below for nested schema)hostname(String) Name of the target host in the local networkid(Number) Unique identifier of the port forwarding
Nested Schema for host
Optional:
default_name(String) Default name of the hosthost_type(String) When possible, the Freebox will try to guess the host_type, but you can manually override this to the correct valuepersistent(Boolean) If true the host is always shown even if it has not been active since the Freebox startupprimary_name(String) Host primary name (chosen from the list of available names, or manually set by user)
Read-Only:
active(Boolean) If true the host sends traffic to the Freeboxfirst_activity_seconds(Number) First time the host sent traffic, or null if it wasn’t seen before this field was added.id(String) ID of the hostinterface(String) Interface of the hostl2ident(Attributes) Layer 2 network id and its type (see below for nested schema)l3connectivities(Attributes List) List of available layer 3 network connections (see below for nested schema)names(Attributes List) List of available names, and their source (see below for nested schema)network_control(Attributes) If device is associated with a profile, contains profile summary. (see below for nested schema)primary_name_manual(Boolean) If true the primary name has been set manuallyreachable(Boolean) If true the host can receive traffic from the Freeboxvendor_name(String) Host vendor name (from the mac address)
Nested Schema for host.l2ident
Optional:
id(String) ID of the L2 identtype(String) Type of the L2 ident
Nested Schema for host.l3connectivities
Optional:
active(Boolean) Whether the L3 connectivity is activeaddress(String) Address of the L3 connectivityreachable(Boolean) Whether the L3 connectivity is reachabletype(String) Type of the L3 connectivity
Nested Schema for host.names
Optional:
name(String) Name of the hostsource(String) Source of the host
Nested Schema for host.network_control
Read-Only:
current_mode(String) Mode described in Network Control Objectname(String) Name of the profile this device is associated withprofile_id(Number) ID of the profile this device is associated with
Import
# ------------------------------------------------ 👇 is the ID of the virtual machine
terraform import "freebox_port_forwarding.example" 78