Opened 4 years ago

Closed 4 years ago

Last modified 2 years ago

#13024 closed Patch - Feature (fixed)

Networking Improvements

Reported by: Peter Bennett Owned by: Peter Bennett
Priority: minor Milestone: 29.0
Component: MythTV - General Version: Unspecified
Severity: medium Keywords:
Cc: Ticket locked: no

Description

If anybody has any reservations or problems with this please let me know. See the proposed changes here:

https://github.com/bennettpeter/mythtv/commit/f9c8ad8c

Summary

  • Improved reliability by listening on wildcard ip addresses, so that if an interface starts after mythtv, it will listen on that interface as well.
  • Improved security by rejecting messages from outside your subnets.
  • Above improvements can be overridden if desired.
  • Simplified backend setup, only need to select one ip address or dns name instead of three.

Networking changes

  • Listen on all ip addresses (IPV4 and IPV6). This can be disabled to restore the previous selection of an IPV4 and an IPV6 address.
  • Restrict incoming connections and UDP datagrams to subnets your server is on (IPV4 and IPV6), plus link-local addresses. This can be disabled to allow connections from everywhere.
  • Use a new method of determining the master backend, via a new setting called MasterServerName, instead of having to compare ip addresses of the backend against a master server address.

Backend Setup first page changed as follows:

  • Added checkboxes for "Allow Connections from all Subnets" (default false), "Listen on All IP Addresses" (default true).
  • Selection of IPV4 and IPV6 addresses is hidden unless you uncheck the "Listen on All IP Addresses".
  • Add a "Primary IP address / DNS name" entry which is a combo box of all local ip addresses, which also allows typing a DNS name. This is the address that will be used to contact this backend. This replaces the "Master backend IP address", "IPV4 address" and "IPV6 address".
  • Add a "This server is the master backend" checkbox, which sets the new setting for master backend. This replaces the "Master server ip address" and "master server port"

Settings changes:

  • Global - MasterServerName (new, required)
  • Global - MasterServerIP - deprecate
  • Global - MasterServerPort - deprecate
  • Host - ListenOnAllIps (new, not required)
  • Host - BackendServerAddr (new, required)
  • Host - BackendServerIP - not entered when Listen on all
  • Host - BackendServerIP6 - not entered when Listen on all
  • Host - AllowConnFromAll (new, not required)

The deprecated settings are no longer referenced in the mythtv code, perl bindings or php bindings. They are still being updated by setup so are still available for code which uses them. The python bindings are still using them

The BackendServerIP and BackendServerIP6 are not used by the code if listen on all is selected. The setup page is still putting in valid values in that case for code which may be using them.

Database schema version is increasing from 1346 to 1347 to add the new required settings.

Removed checks for QT_NO_IPV6.

  • #if !defined(QT_NO_IPV6) - remove this, remove #else code
  • #if defined(QT_NO_IPV6) - remove this plus code.Leave else code present.

Change History (6)

comment:1 Changed 4 years ago by Peter Bennett

Status: newassigned

comment:2 Changed 4 years ago by Peter Bennett <pbennett@…>

Resolution: fixed
Status: assignedclosed

In e6f11ce287d467053de719402fbcad5f6fb8047c/mythtv:

Networking improvements

  • Improved reliability by listening on all ip addresses, so that if an interface starts after mythtv, it will listen on that interface as well.
  • Improved security by rejecting messages from outside your subnets.
  • Above improvements can be overridden if desired.
  • Simplified backend setup, only need to select one ip address or dns name instead of three.

Fixes #13024

comment:3 Changed 4 years ago by Peter Bennett <pbennett@…>

In f96871d2a216d7775249bfea96cac0c221ec0b04/mythtv:

Removed checks for QT_NO_IPV6.

Refs #13024

comment:4 Changed 4 years ago by Peter Bennett <pbennett@…>

In 8b5e5075c8313f80b1e9e9f4f2690b2ecd6eeac8/mythtv:

Disable MythTV IPv6 use for systems that do not have IPv6 support.

Networking changes are causing problems for those who have disabled
IPv6 in the operating system.

Refs #13024

comment:5 Changed 4 years ago by Peter Bennett <pbennett@…>

In eba33b5e59ab98132eaade5fb30c1f8e69546e4c/mythtv:

Fix backend setup when specific IPv4 and IPv6 addresses are used.

A bug with networking improvements prevented filling in both
ip addresses when you deselect "listen on all"

Refs #13024

comment:6 Changed 2 years ago by Peter Bennett

Owner: changed from Peter Bennett to Peter Bennett
Note: See TracTickets for help on using tickets.