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

Selection of Carp Adresses in ipsec #3732

Closed
rkirmis opened this issue Sep 28, 2019 · 12 comments
Closed

Selection of Carp Adresses in ipsec #3732

rkirmis opened this issue Sep 28, 2019 · 12 comments
Labels
help wanted Contributor missing / timeout

Comments

@rkirmis
Copy link

rkirmis commented Sep 28, 2019

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

[+] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md

[+] I have searched the existing issues and I'm convinced that mine is new.

Describe the bug
If there are more than one CARP IPs defined, the selection box for the ipsec phase 1 interface
only lists the last entry of CARP IPs for that Interface. The other IPs are not in the list.

To Reproduce
Steps to reproduce the behavior:

  1. Add 2 Carp IPs on WAN Interface
  2. Edit IPSEC Tunnel Phase 1
  3. Select IP Addresse

Expected behavior
All Carp IPs are in the list and selectable

Screenshots

Relevant log files

Additional context
A VPN use an virtual IP as VPN interface.
I have defined for the WAN interface multiple virtual IPs.
The IP written in /usr/local/etc/ipsec.conf is the last defined virtual WAN IP in Firewall -> Virtual IP -> Settings (not that one display in VPN->IPsec->Tunnel Settings->Phase 1)
It’s mandatory that we can choose in VPN settings every virtual IP defined and not randomly one from WAN interface

Path to file
/vpn_ipsec_phase1.php?p1 (URL)
/usr/local/etc/ipsec.conf (File path)

Environment

OPNsense 19.7.4_1 (amd64, LibreSSL)

@AdSchellevis AdSchellevis added incomplete Issue template missing info support Community support labels Sep 28, 2019
@ampfinger
Copy link

I have got the same problem here. Multiple virtual WAN addresses but can only choose one WAN address in ipsec phase 1 definition.
And the shown WAN address isn't the one which is entered in ipsec.conf, instead it is the last virtual WAN address in Firewall - Virtual IPs.
I can provide screenshots if necessary.

@rkirmis
Copy link
Author

rkirmis commented Oct 25, 2019

Whta can i do, to complete the issue?
How do i get the incomplete flag removed?

@mimugmail
Copy link
Member

Screenshot would be a good start. Today I helped a customer with latest 19.7.5_5 and around 20 CARP aliases where everyone was selectable ...

@fichtner fichtner removed the incomplete Issue template missing info label Nov 11, 2019
@Kimotu
Copy link

Kimotu commented Nov 14, 2019

I am on 19.7.6 and having a similar issue. But since running IPv6 configuration, I can confirm that with IPv6, the expected behavior works. All IPv6 CARP addresses get listed. Just IPv4 CARP adresses are missing.

Here a list what is listed and selectable:

  • interface address (ipv4) (the physical one when you select an interface, WAN, LAN, ...)
  • IPv4 IP-Aliases
  • IPv6 IP-Aliases
  • IPv6 CARP-Adresses

Not listed:

  • IPv4 CARP addresses

Not even one IPv4 CARP adress is listed.

VPN

@AdSchellevis
Copy link
Member

Same interface and same vhid used multiple times? (for the missing ones)

That would be the only thing I can think of looking at the code.

$iflist["{$vip['interface']}_vip{$vip['vhid']}"] = $vip['subnet'];

^^ can't cope with overlap

@Kimotu
Copy link

Kimotu commented Nov 22, 2019 via email

@AdSchellevis AdSchellevis self-assigned this Nov 22, 2019
@AdSchellevis AdSchellevis added bug Production bug and removed support Community support labels Nov 22, 2019
@AdSchellevis
Copy link
Member

ok we need to check the callers of get_configured_carp_interface_list() then, one tip for future issue tracking, try to be very specific about what's configured and how you expect it to appear (details matter a lot in these cases).

@AdSchellevis AdSchellevis added cleanup Low impact changes and removed bug Production bug labels Nov 22, 2019
@AdSchellevis
Copy link
Member

There won't be an easy fix for this without breaking existing configurations or needing changes to existing setups. Since the schema [interface]_vip[hid] isn't unique and stored in multiple places.

Marked the ticket as cleanup for now, it's an omission in the system, a workaround could be to use separate vhid's in cases you want to use them for binding.

@AdSchellevis
Copy link
Member

looking at the validations again, you shouldn't be allowed to add more than one carp vhid on an interface. 754d483 Intended use is to use aliases for the non-primary one (which also prevents trying to set the password several times on the same interface).

@AdSchellevis AdSchellevis removed their assignment Nov 23, 2019
@AdSchellevis AdSchellevis removed the cleanup Low impact changes label Nov 23, 2019
@Kimotu
Copy link

Kimotu commented Nov 24, 2019 via email

@AdSchellevis
Copy link
Member

since the internal key is per interface+vhid it won't support overlap, the previous bug (754d483) allowed such entries to be made. Changing this would probably mean to support ip aliases with a vhid in these selections and add some sort of key to identify them, but unfortunately this probably involves quite some work to fix a pattern that's already quite flawed (mixing interfaces and addresses).

fichtner pushed a commit that referenced this issue Jan 24, 2020
@AdSchellevis
Copy link
Member

This issue has been automatically timed-out (after 180 days of inactivity).

For more information about the policies for this repository,
please read https://github.com/opnsense/core/blob/master/CONTRIBUTING.md for further details.

If someone wants to step up and work on this issue,
just let us know, so we can reopen the issue and assign an owner to it.

@AdSchellevis AdSchellevis added the help wanted Contributor missing / timeout label Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributor missing / timeout
Development

No branches or pull requests

6 participants