/[smeserver]/rpms/e-smith-packetfilter/sme10/e-smith-packetfilter-2.6.0-bz11640-VPNif.patch
ViewVC logotype

Contents of /rpms/e-smith-packetfilter/sme10/e-smith-packetfilter-2.6.0-bz11640-VPNif.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Tue Nov 16 03:18:06 2021 UTC (2 years, 6 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-packetfilter-2_6_0-8_el7_sme, HEAD
* Mon Nov 15 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.6.0-8.sme
- restrict VPN networks to their interface [SME: 11640]
  remove remoteVPNSubnet property added VPNif property

1 diff -Nur --no-dereference e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90local_chk50networks e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90local_chk50networks
2 --- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90local_chk50networks 2006-03-15 21:38:35.000000000 -0500
3 +++ e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90local_chk50networks 2021-11-15 22:16:10.453000000 -0500
4 @@ -6,16 +6,13 @@
5 # Make a new local_chk chain and add any networks found in networks db
6 foreach my $local (@locals)
7 {
8 - # If the network is a remote vpn subnet, restrict it to the ipsec0
9 + # If the network is a remote vpn subnet, restrict it to the VPN
10 # interface.
11 my ($net, $msk) = split /\//, $local;
12 my $netrec = $nets->get($net);
13 die "Can't find network $net in networks db!\n" unless $netrec;
14 $OUT .= "/sbin/iptables -A \$NEW_local_chk -s $local";
15 - if (($netrec->prop('remoteVPNSubnet') || 'no') eq 'yes')
16 - {
17 - $OUT .= " --in-interface ipsec0";
18 - }
19 + $OUT .= " --in-interface " . $netrec->prop('VPNif') if ( $netrec->prop('VPNif') );
20 $OUT .= " -j ACCEPT\n";
21 }
22 }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed