Hi,

I use shorewall-4.5.4 + lsm-0.143 and it does not seem to work as expected...
When all providers are up, everything seems fine.

When one goes down, lsm says "link <provider> down event"... and it seems 

ok but we then experience some problems such as a few unreachable sites, 

DNS problems...
If I remove the downed provider from all confs and restart, everything works 
again.

Also, when the providers goes back up, lsm seems not to detect it when I use 
external IPs or the next hop.  He does if I use the LAN IPs but he won't 
detect a failure past the box.

Could someone check my confs to see if certain parameters would prevent 
graceful deactivation of a provider...?
Maybe the accounting rules that use all 3 providers?

About lsm, do I need to manualy add routes for the checked WAN IPs to go 
through the respecting devices (as I read on the net) even though the 
devices are in the conf?
I am also not sure about the ttl parameter... Should it match the numbers 
of hops from the firewall?  By example, if the provider has 192.168.2.254 
for lan, a.b.c.d for wan et w.x.y.z for the next hop... if I do the lsm 
check on w.x.y.z, should I put a ttl=2? and 1 if I check a.b.c.d?

Thx,
JD

----------------------------------------------------------------------
/etc/shorewall/shorewall.conf
----------------------------------------------------------------------

STARTUP_ENABLED=Yes
VERBOSITY=1
BLACKLIST_LOGLEVEL=
LOG_MARTIANS=Yes
LOG_VERBOSITY=2
LOGALLNEW=
LOGFILE=/var/log/messages
LOGFORMAT="Shorewall:%s:%s:"
LOGTAGONLY=No
LOGLIMIT=
MACLIST_LOG_LEVEL=info
RELATED_LOG_LEVEL=
SFILTER_LOG_LEVEL=info
SMURF_LOG_LEVEL=info
STARTUP_LOG=/var/log/shorewall-init.log
TCP_FLAGS_LOG_LEVEL=info
CONFIG_PATH="${CONFDIR}/shorewall:${SHAREDIR}/shorewall"
GEOIPDIR=/usr/share/xt_geoip/LE
IPTABLES=
IP=
IPSET=
LOCKFILE=
MODULESDIR=
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin"
PERL=/usr/bin/perl
RESTOREFILE=restore
SHOREWALL_SHELL=/bin/sh
SUBSYSLOCK=/var/lock/subsys/shorewall
TC=
ACCEPT_DEFAULT=none
DROP_DEFAULT=Drop
NFQUEUE_DEFAULT=none
QUEUE_DEFAULT=none
REJECT_DEFAULT=Reject
RCP_COMMAND='scp ${files} ${root}@${system}:${destination}'
RSH_COMMAND='ssh ${root}@${system} ${command}'
ACCOUNTING=Yes
ACCOUNTING_TABLE=filter
ADD_IP_ALIASES=Yes
ADD_SNAT_ALIASES=No
ADMINISABSENTMINDED=Yes
AUTO_COMMENT=Yes
AUTOMAKE=No
BLACKLISTNEWONLY=Yes
CLAMPMSS=No
CLEAR_TC=Yes
COMPLETE=No
DELETE_THEN_ADD=Yes
DETECT_DNAT_IPADDRS=No
DISABLE_IPV6=Yes
DONT_LOAD=
DYNAMIC_BLACKLIST=Yes
EXPAND_POLICIES=Yes
EXPORTMODULES=Yes
FASTACCEPT=No
FORWARD_CLEAR_MARK=
IMPLICIT_CONTINUE=Yes
IPSET_WARNINGS=Yes
IP_FORWARDING=On
KEEP_RT_TABLES=No
LEGACY_FASTSTART=Yes
LOAD_HELPERS_ONLY=No
MACLIST_TABLE=filter
MACLIST_TTL=
MANGLE_ENABLED=Yes
MAPOLDACTIONS=No
MARK_IN_FORWARD_CHAIN=No
MODULE_SUFFIX=ko
MULTICAST=No
MUTEX_TIMEOUT=60
NULL_ROUTE_RFC1918=No
OPTIMIZE=0
OPTIMIZE_ACCOUNTING=No
REQUIRE_INTERFACE=No
RESTORE_DEFAULT_ROUTE=Yes
RETAIN_ALIASES=No
ROUTE_FILTER=No
SAVE_IPSETS=No
TC_ENABLED=No
TC_EXPERT=No
TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2"
TRACK_PROVIDERS=No
USE_DEFAULT_RT=No
USE_PHYSICAL_NAMES=No
ZONE2ZONE=2
BLACKLIST_DISPOSITION=DROP
MACLIST_DISPOSITION=REJECT
RELATED_DISPOSITION=ACCEPT
SMURF_DISPOSITION=DROP
SFILTER_DISPOSITION=DROP
TCP_FLAGS_DISPOSITION=DROP
TC_BITS=
PROVIDER_BITS=
PROVIDER_OFFSET=
MASK_BITS=
ZONE_BITS=0
IPSECFILE=zones

----------------------------------------------------------------------
/etc/shorewall/interfaces
----------------------------------------------------------------------

sdsl   eth1   dhcp,tcpflags,routefilter,nosmurfs,logmartians,optional
free   eth2   dhcp,tcpflags,routefilter,nosmurfs,logmartians,optional
#ovh   eth3   dhcp,tcpflags,routefilter,nosmurfs,logmartians,optional
loc    eth0   tcpflags,nosmurfs,routeback
vpn    tun0   tcpflags,nosmurfs

----------------------------------------------------------------------
/etc/shorewall/providers
----------------------------------------------------------------------

sdsl   1   1   main   eth1   <IPWAN_SDSL>    track,balance   eth0
free   2   2   main   eth2   192.168.0.254   track,balance   eth0
ovh    3   3   main   eth3   192.168.2.254   track,balance   eth0

----------------------------------------------------------------------
/etc/shorewall/zones
----------------------------------------------------------------------

fw      firewall
loc     ipv4
sdsl    ipv4
vpn     ipv4
free    ipv4
ovh     ipv4

----------------------------------------------------------------------
/etc/shorewall/policy
----------------------------------------------------------------------

loc     fw      ACCEPT
fw      loc     ACCEPT
loc     sdsl    ACCEPT
fw      sdsl    ACCEPT
loc     vpn     ACCEPT
vpn     loc     ACCEPT
loc     free    ACCEPT
fw      free    ACCEPT
loc     ovh     ACCEPT
fw      ovh     ACCEPT
sdsl    all     DROP            info
free    all     DROP            info
ovh     all     DROP            info
all     all     REJECT          info

----------------------------------------------------------------------
/etc/shorewall/tcinterfaces
----------------------------------------------------------------------

eth0            internal        1000mbit        1000mbit
eth1            external        4mbit           4mbit
tun0            internal        2mbit           1mbit
eth2            external        6mbit           796kbit
eth3            external        6610kbit        796kbit

----------------------------------------------------------------------
/etc/shorewall/rtrules
----------------------------------------------------------------------

192.168.16.0/20         <IP>/23        sdsl            1000

----------------------------------------------------------------------
/etc/shorewall/tunnels
----------------------------------------------------------------------

openvpn:1194            sdsl    <IP>
...

----------------------------------------------------------------------
/etc/shorewall/rules
----------------------------------------------------------------------

some rules (only the sdsl)...

----------------------------------------------------------------------
/etc/shorewall/masq
----------------------------------------------------------------------

eth1   192.168.16.0/20   <IPWAN_SDSL>
eth2   192.168.16.0/20   192.168.0.251
eth3   192.168.16.0/20   192.168.2.251
eth0   tun0

----------------------------------------------------------------------
/etc/shorewall/accounting
----------------------------------------------------------------------

many accounting rules on all 3 providers like:
client1_sdsl -   eth0:192.168.16.22   eth1                 tcp
client1_sdsl -   eth1                 eth0:192.168.16.22   tcp
client1_sdsl -   eth0:192.168.16.22   eth1                 udp
client1_sdsl -   eth1                 eth0:192.168.16.22   udp
COUNT   client1_sdsl   eth0:192.168.16.22   eth1
COUNT   client1_sdsl   eth1                 eth0:192.168.16.22
client1_free -   eth0:192.168.16.22   eth2                 tcp
client1_free -   eth2                 eth0:192.168.16.22   tcp
client1_free -   eth0:192.168.16.22   eth2                 udp
client1_free -   eth2                 eth0:192.168.16.22   udp
COUNT   client1_free   eth0:192.168.16.22   eth2
COUNT   client1_free   eth2                 eth0:192.168.16.22
client1_ovh  -   eth0:192.168.16.22   eth3                 tcp
client1_ovh  -   eth3                 eth0:192.168.16.22   tcp
client1_ovh  -   eth0:192.168.16.22   eth3                 udp
client1_ovh  -   eth3                 eth0:192.168.16.22   udp
COUNT   client1_ovh    eth0:192.168.16.22   eth3
COUNT   client1_ovh    eth3                 eth0:192.168.16.22
...

----------------------------------------------------------------------
/etc/lsm/lsm.conf
----------------------------------------------------------------------

debug=8
defaults {
  name=defaults
  checkip=127.0.0.1
  eventscript=/etc/lsm/script
  notifyscript=/usr/share/lsm/default_script
  max_packet_loss=15
  max_successive_pkts_lost=7
  min_packet_loss=5
  min_successive_pkts_rcvd=10
  interval_ms=1000
  timeout_ms=1000
  [email protected]
  check_arp=0
  sourceip=
  ttl=0
}
include /etc/lsm/shorewall.conf

----------------------------------------------------------------------
/etc/lsm/shorewall.conf
----------------------------------------------------------------------

connection {
    name=sdsl
    checkip=<EXTERNAL_IP_SDSL>
    device=eth1
    ttl=2
}

connection {
    name=free
    checkip=<EXTERNAL_IP_FREE>
    device=eth2
    ttl=2
}

connection {
    name=ovh
    checkip=<EXTERNAL_IP_OVH>
    device=eth3
    ttl=2
}


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to