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

pfsense_interface does not support IPv6 Configuration types: DHCP6, 6rd Tunnel, 6t4 Tunnel and Track Interface #123

Open
der-gabe opened this issue Mar 27, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@der-gabe
Copy link

der-gabe commented Mar 27, 2024

Describe the bug
I have a Netgate SG2100 router and have been trying to use pfsensible.core to configure it.

The router sits behind a cable modem, so the WAN interface gets its IPv4 address via DHCP and the IPv6 address via either DHCP6 or SLAAC (both work).

I was able set up the the WAN interface successfully with IPv6 config. type SLAAC. (Thanks! 🙂 👍)

Now I want to configure the LAN interface. Specifically, I want the LAN interface's IPv6 address to track that of the WAN interface, since that might change and there is no NATting and no private subnets in IPv6 (or at least not in the way we're used to from IPv4). So I cannot use IPv6 Configuration Type "static" and set a static IPv6 address and prefix length.

I can do this manually, but not with pfsensbile.core, because pfsense_interface's ipv6_type field only supports the values none, static and slaac, while pfSense additionally supports:

  • DHCP6
  • 6rd Tunnel
  • 6t4 Tunnel
  • Track Interface

Each of these options comes with additional sub-options, except for "6t4 Tunnel".

Expected behavior

pfsense_interface should probably support all the IPv6 Configuration Types that pfSense offers.

Playbook
Please paste a minimal playbook to reproduce the issue:

---
- name: Interfaces
  hosts: "netgate-sg2100.lan"
  tasks:
  - name: LAN interface
    pfsensible.core.pfsense_interface:
      descr: LAN
      enable: true
      ipv4_address: 192.168.1.1
      ipv4_type: static
      ipv6_type: track_interface
      ipv6_interface: WAN
      ipv6_prefix_id: 0
      interface: mvneta1

Output
Please paste the ansible output run with -vv:

ansible-playbook [core 2.16.4]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/gabe/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.11/site-packages/ansible
  ansible collection location = /home/gabe/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible-playbook
  python version = 3.11.8 (main, Feb 08 2024, 08:03:16) [GCC] (/usr/bin/python3.11)
  jinja version = 3.1.3
  libyaml = True
Using /etc/ansible/ansible.cfg as config file
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: playbook.yml *************************************************************************************************************
4 plays in playbook.yml
[...]
TASK [LAN interface] ***************************************************************************************************************
task path: /home/gabe/git/iupiter/kenough/playbook.yml:25
fatal: [netgate-sg2100.lan]: FAILED! => {"changed": false, "msg": "value of ipv6_type must be one of: none, static, slaac, got: track_interface"}

Environment

  • What version of pfsensible.core?
    Commit 5ada6e4 (latest commit on master, as of this writing)
  • What version of ansible?
    2.16.4
  • What version of pfSense?
    22.05-RELEASE (arm64)

Additional context
Personally, I only need "Track Interface" but I think DHCP6 is common enough EDIT: and DHCP6 (my setup has changed). And I think that pfsense_interface should probably support it both to be anywhere near feature complete.

I speak Python and I'd be willing to help out with implementation, but I don't know the codebase of pfsensible.core and I've never implemented anything for Ansible, so it might take me forever...

I'm definitely available for testing and review, though!

@der-gabe der-gabe added the bug Something isn't working label Mar 27, 2024
@der-gabe
Copy link
Author

Come to think of it, I should probably have opened this as a feature request...

I can't seem to change this now, but feel free to relabel.

@opoplawski opoplawski added enhancement New feature or request and removed bug Something isn't working labels Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants