1
24.1 Legacy Series / Re: Upgrade to 24.1.4 needs two steps
« on: March 21, 2024, 02:20:12 pm »
I confirm. There was the same thing
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
I'm not blocking anything.
Nothing is needed... the problem is that dynamic addresses are not supported and it would be better to leave it at that.Ah, I understand. Now you will also specifically block this method
What happens if you create multiple l2tp devices on the same interface with the same settings but different gateway IPs?I tried this scheme and it doesn't work. What is needed is WAN-DHCP and on top of it OPT-L2TP
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index c138566a1eeb0f0a1ce3f68178aeca2e9135fecb..cc0bca90808d20735364769b7d002b03ca757880 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -6478,6 +6478,27 @@ function link_interface_to_tunnelif($interface, $type, $remote = 'any') {
return $result;
}
+function link_interface_to_ppp_tunnelif($interface) {
+ global $config;
+
+ $result = array();
+
+ if (empty($interface)) {
+ return $result;
+ }
+
+ if (is_array($config['ppps']['ppp'])) {
+ $realif = get_real_interface($interface);
+ foreach ($config['ppps']['ppp'] as $ppp) {
+ if (($ppp['ports'] == $realif) && in_array($ppp['type'], array('l2tp', 'pptp'))) {
+ $result[] = $ppp;
+ }
+ }
+ }
+
+ return $result;
+}
+
/*
* find_interface_ip($interface): return the interface ip (first found)
*/
diff --git a/src/etc/rc.newwanip b/src/etc/rc.newwanip
index ff4a75837c613ead7d66ec25ab2fae2db8cb6994..2b04a33db4a607cf08afbd6e01b803b791547ec7 100755
--- a/src/etc/rc.newwanip
+++ b/src/etc/rc.newwanip
@@ -128,6 +128,9 @@ array_walk($gre, 'interface_gre_configure');
$gif = link_interface_to_tunnelif($interface, 'gif', 'inet');
array_walk($gif, 'interface_gif_configure');
+/* reconfigure L2TP/PPTP tunnels, see https://redmine.pfsense.org/issues/12072 */
+$ppp = link_interface_to_ppp_tunnelif($interface);
+
$grouptmp = link_interface_to_group($interface);
if (!empty($grouptmp)) {
array_walk($grouptmp, 'interface_group_add_member');
@@ -181,6 +184,13 @@ foreach ($gre as $gretun) {
system_routing_configure($confif);
}
}
+foreach ($ppp as $ppptun) {
+ $confif = convert_real_interface_to_friendly_interface_name($ppptun['if']);
+ if (!empty($confif)) {
+ interface_configure($confif);
+ system_routing_configure($confif);
+ }
+}
if (platform_booting() && !in_array(substr($interface_real, 0, 3), array("ppp", "ppt", "l2t"))) {
// unlike dhcp interfaces which wait until they get an ip, a ppp connection lets the boot continue while
If you find the old cron job in the source code you can bring it back on your own... ;-)Oh... It's complicated. But anyway thanks for the advice.
Depending on what you are trying to accomplish.As I wrote above, I need to completely restart the Wireguard service once a day. With connection reset and all statistics. Previously, this was possible using the "Restart the Wireguard service" item. This item has now disappeared. Am I explaining clearly?
you could probably use the "Renew DNS for Wireguard on stale connections"I tried it and it didn't work. This item does not restart the service Wireguard - Connection is not reset, statistics are not reset