On 7/1/2015 9:57 AM, Eddie wrote: > Hi, > > I'm trying to run shorewall inside an OpenVPN --up script to account for > the just created tun interface. This is failing with the following, > from the OpenVPM log: > > Wed Jul 1 09:29:07 2015 /etc/openvpn/tunup.sh tun1 1500 1546 10.10.1.38 > 10.10.1.37 init > Compiling... > Processing /etc/shorewall/params ... > Processing /etc/shorewall/shorewall.conf... > Loading Modules... > Can't exec "lsmod": No such file or directory at > /usr/share/perl5/vendor_perl/Shorewall/Config.pm line 3823. > ERROR: Can't run lsmod /usr/share/shorewall/modules (line 1) > Wed Jul 1 09:29:07 2015 WARNING: Failed running command (--up/--down): > external program exited with error status: 2 > > The equivalent shorewall log has: > > Jul 1 9:29:07 Processing /etc/shorewall/params ... > Jul 1 9:29:07 Processing /etc/shorewall/shorewall.conf... > Jul 1 9:29:07 Loading Modules... > Jul 1 09:29:07 ERROR: Can't run lsmod /usr/share/shorewall/modules > (line 1) > > And this is the script: > > #!/bin/sh > > # Set loose mode reverse filtering on the VPN tunnel > echo 2 > /proc/sys/net/ipv4/conf/$1/rp_filter > > # Masquerade the tunnel > echo -e "$1" > /etc/e-smith/templates-custom/etc/shorewall/masq/30openvpn > > # Set up the providers > echo -e "net\t1\t0x10000\t-\teth0\t192.168.0.254\ttrack" > > /etc/e-smith/templates-custom/etc/shorewall/providers/40openvpn > > # Reload the firewall > #/sbin/e-smith/signal-event firewall-adjust > /usr/sbin/shorewall restart > > Everything except the firewall restart works exactly as expected and if > I run the script as a command, shorewall runs to normal completion. > > Do I need to do something special to run this. Where is lsmod located on your system? And what is your PATH setting in /etc/shorewall/shorewall.conf? I suspect that the directory hosting lsmod isn't on the PATH.
-Tom -- Tom Eastep \ When I die, I want to go like my Grandfather who Shoreline, \ died peacefully in his sleep. Not screaming like Washington, USA \ all of the passengers in his car http://shorewall.net \________________________________________________
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/
_______________________________________________ Shorewall-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shorewall-users
