oscam-smod icon indicating copy to clipboard operation
oscam-smod copied to clipboard

Not cycling through IPs when connecting to remote servers

Open Schimmelreiter opened this issue 5 years ago • 0 comments

If a hostname, e.g. server.dyndns.org, resolves to multiple IPs, e.g.

  • an AAAA record (IPv6) and an A record (IPv4) for dual-stack servers and/or
  • multiple A records (For multi-homed servers),

oscam-smod does not cycle through these IP addresses.

This breaks

  • connections to servers with a bad AAAA record but a good A record (Quite common misconfiguration by IPv6-ignorant server operators
  • connections to the other home of a server if the A record selected by oscam-smod becomes unreachable, while the other A record is still reachable (multi-homed server in failover mode).

Examples:

  1. AVM Fritz!Boxes can perform automatic DynDNS updates. However, for connections with dual-stack, they will always perform updates of the AAAA record of the DynDNS using the Fritz!Box' IPv6 address. But if the oscam server runs on any other machine inside the network, the IPv6 of that other machine would be needed to connect, not the IPv6 of the Fritz!Box. Cycling through the resolved records would at least allow IPv4 connections in such cases.

  2. An oscam server is multi-homed, e.g. it can be reached through the server operator's WAN connections 1 and 2 under normal conditions (WAN load-balancing), but oscam-smod will always stick to the first IP it decided for. If the server's WAN connection 1 fails but oscam-smod decided to use the IP address of the server's WAN1, it will never attempt to connect via the server's other WAN (WAN2), which would still be connectable.

Schimmelreiter avatar Dec 07 '19 19:12 Schimmelreiter