On 12/4/2015 2:01 AM, Laurie Brown wrote: > On 03/12/15 23:28, Tom Eastep wrote:
>> >> More clearly: >> >> if [ -f /var/lib/dhcp/dhclient.${1}.leases ]; then >> grep 'option routers' /var/lib/dhcp/dhclient.${1}.leases | \ >> tail -n 1 | \ >> while read j1 j2 gateway; do >> echo $gateway | sed 's/;//' >> return 0 >> done >> fi >> >> -Tom > > Hi Tom, > > I do have findgw in my /etc/shorewall directory, and it was copied from > here: http://www.shorewall.net/pub/shorewall/contrib/findgw/Lenny > > I had to amend it slightly, removing the 3 from dhcp3 as you have done. > I've commented the original out and substituted yours (which is slightly > different), and it has made no difference. > > If I run the snippet with eth3 specified it does return the correct gateway. > > Here is my providers file: > > ---- cut here ---- > # > # Shorewall version 4 - Providers File > # > # For information about entries in this file, type "man shorewall-providers" > # > # For additional information, see http://shorewall.net/MultiISP.html > # > ################################################################################################################## > #NAME NUMBER MARK DUPLICATE INTERFACE GATEWAY > OPTIONS COPY > ECLI 1 0x10000 - ECL_IF - > loose,track,balance=1 - > VIRG 2 0x20000 - VIR_IF detect > loose,track,balance=10 - > ---- cut here ---- > > I have substituted eth3 for VIR_IF to no avail. Even if I hard-code the > actual gateway in the providers file, it still won't start... > > My eth3.leases file: > > ---- cut here ---- > # cat /var/lib/dhcp/dhclient.eth3.leases > lease { > interface "eth3"; > fixed-address 82.9.127.74; > option subnet-mask 255.255.252.0; > option routers 82.9.124.1; > option dhcp-lease-time 454295; > option dhcp-message-type 5; > option domain-name-servers 194.168.4.100,194.168.8.100; > option dhcp-server-identifier 62.253.131.74; > option interface-mtu 1500; > option broadcast-address 255.255.255.255; > option host-name "fw1"; > option domain-name "cable.virginmedia.net"; > renew 0 2015/12/06 22:27:02; > rebind 3 2015/12/09 00:12:13; > expire 3 2015/12/09 15:58:40; > } > ---- cut here ---- > > Thanks for your help so far. > > Cheers, Laurie. > Please forward the compiled script. Thanks, -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 \________________________________________________ ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 _______________________________________________ Shorewall-users mailing list Shorewall-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/shorewall-users