Hi Tom,
After two weeks of nightmares I decided ask You (and anyone reading this mail).
Context is as follows:
I try to update system on my central router from kernel 2.6.29.6 and Shorewall
4.2.6 (old) to kernel 2.6.31.6 and Shorewall 4.4.4.2 (new).
This is LiveCD image boot (Devil-Linux distribution compiled by me), so config
is this same.
I have established ten OpenVPN tunnels and two IPsec tunnels. I have five
ethernet interfaces, to LAN, DMZ, WLAN and two to ISPs.
With ISPs BGP sessions (quagga) are established. BGP sessions are simple
dual-homing, broadcasting only my "C" class, with deny on input only
rfc1918
addresses, without transit and any other message manipulations.
Providers are declared in /etc/shorewall/providers but without marks (only for
generate provider routing tables). There are no any tc declarations.
After change of OS some tunnels cannot be reestablished because FROM some
divisions clients cannot connect to this central router.
Two weeks of night testing gives interesting results! Problems with connection
to VPN servers on my router are only from this sites, from where routefilter
should discard answer packets (packet enters via one ISP and exits via
another, call this assymetric). But my ISP interfaces are declared with
options: optional,logmartians,blacklist,nosmurfs,routefilter=0
and in /proc/sys/net this really is set. Problem is not with answers to router
(as we can think), but with answer to external connections, so I can ping from
router this external localization.
If packet enters via this same interface as exits (symmetric), all is working
in new system as was in old one.
In /proc/sys/net settings are this same except
/proc/sys/net/ipv4/conf/.../arp_accept=0 not present in old kernel.
Additionally I tested on old system new quagga version (0.99.15 as in new
system) -- was working OK.
On new system I run iptrace. For symmetric ICMP packet from external source to
my gate 195.187.140.1 I obtain:
> TRACE: raw:PREROUTING:policy:2 IN=eth3 OUT= SRC=83.3.197.202
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=59 ID=48172 PROTO=ICMP TYPE=8
CODE=0 ID=49174 SEQ=37889
> TRACE: mangle:PREROUTING:rule:1 IN=eth3 OUT= SRC=83.3.197.202
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=59 ID=48172 PROTO=ICMP TYPE=8
CODE=0 ID=49174 SEQ=37889
> TRACE: mangle:tcpre:return:1 IN=eth3 OUT= SRC=83.3.197.202
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=59 ID=48172 PROTO=ICMP TYPE=8
CODE=0 ID=49174 SEQ=37889
> TRACE: mangle:PREROUTING:policy:2 IN=eth3 OUT= SRC=83.3.197.202
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=59 ID=48172 PROTO=ICMP TYPE=8
CODE=0 ID=49174 SEQ=37889
> TRACE: mangle:INPUT:policy:1 IN=eth3 OUT= SRC=83.3.197.202
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=59 ID=48172 PROTO=ICMP TYPE=8
CODE=0 ID=49174 SEQ=37889
> TRACE: filter:INPUT:rule:1 IN=eth3 OUT= SRC=83.3.197.202 DST=195.187.140.1
LEN=28 TOS=0x00 PREC=0x00 TTL=59 ID=48172 PROTO=ICMP TYPE=8 CODE=0 ID=49174
SEQ=37889
> TRACE: filter:dynamic:return:1 IN=eth3 OUT= SRC=83.3.197.202
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=59 ID=48172 PROTO=ICMP TYPE=8
CODE=0 ID=49174 SEQ=37889
> TRACE: filter:INPUT:rule:3 IN=eth3 OUT= SRC=83.3.197.202 DST=195.187.140.1
LEN=28 TOS=0x00 PREC=0x00 TTL=59 ID=48172 PROTO=ICMP TYPE=8 CODE=0 ID=49174
SEQ=37889
> TRACE: filter:eth3_in:rule:1 IN=eth3 OUT= SRC=83.3.197.202
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=59 ID=48172 PROTO=ICMP TYPE=8
CODE=0 ID=49174 SEQ=37889
> TRACE: filter:blacklst:return:4 IN=eth3 OUT= SRC=83.3.197.202
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=59 ID=48172 PROTO=ICMP TYPE=8
CODE=0 ID=49174 SEQ=37889
> TRACE: filter:eth3_in:rule:3 IN=eth3 OUT= SRC=83.3.197.202
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=59 ID=48172 PROTO=ICMP TYPE=8
CODE=0 ID=49174 SEQ=37889
> TRACE: filter:net2fw:rule:1 IN=eth3 OUT= SRC=83.3.197.202 DST=195.187.140.1
LEN=28 TOS=0x00 PREC=0x00 TTL=59 ID=48172 PROTO=ICMP TYPE=8 CODE=0 ID=49174
SEQ=37889
> ====> TRACE: raw:OUTPUT:policy:2 IN= OUT=eth3 SRC=195.187.140.1
DST=83.3.197.202 LEN=28 TOS=0x00 PREC=0x00 TTL=64 ID=33445 PROTO=ICMP TYPE=0
CODE=0 ID=49174 SEQ=37889
> TRACE: mangle:OUTPUT:rule:1 IN= OUT=eth3 SRC=195.187.140.1 DST=83.3.197.202
LEN=28 TOS=0x00 PREC=0x00 TTL=64 ID=33445 PROTO=ICMP TYPE=0 CODE=0 ID=49174
SEQ=37889
> TRACE: mangle:tcout:return:1 IN= OUT=eth3 SRC=195.187.140.1
DST=83.3.197.202 LEN=28 TOS=0x00 PREC=0x00 TTL=64 ID=33445 PROTO=ICMP TYPE=0
CODE=0 ID=49174 SEQ=37889
> TRACE: mangle:OUTPUT:policy:2 IN= OUT=eth3 SRC=195.187.140.1
DST=83.3.197.202 LEN=28 TOS=0x00 PREC=0x00 TTL=64 ID=33445 PROTO=ICMP TYPE=0
CODE=0 ID=49174 SEQ=37889
> TRACE: filter:OUTPUT:rule:2 IN= OUT=eth3 SRC=195.187.140.1 DST=83.3.197.202
LEN=28 TOS=0x00 PREC=0x00 TTL=64 ID=33445 PROTO=ICMP TYPE=0 CODE=0 ID=49174
SEQ=37889
> TRACE: filter:eth3_out:rule:1 IN= OUT=eth3 SRC=195.187.140.1
DST=83.3.197.202 LEN=28 TOS=0x00 PREC=0x00 TTL=64 ID=33445 PROTO=ICMP TYPE=0
CODE=0 ID=49174 SEQ=37889
> TRACE: filter:fw2net:rule:1 IN= OUT=eth3 SRC=195.187.140.1 DST=83.3.197.202
LEN=28 TOS=0x00 PREC=0x00 TTL=64 ID=33445 PROTO=ICMP TYPE=0 CODE=0 ID=49174
SEQ=37889
> TRACE: mangle:POSTROUTING:rule:1 IN= OUT=eth3 SRC=195.187.140.1
DST=83.3.197.202 LEN=28 TOS=0x00 PREC=0x00 TTL=64 ID=33445 PROTO=ICMP TYPE=0
CODE=0 ID=49174 SEQ=37889
> TRACE: mangle:tcpost:return:1 IN= OUT=eth3 SRC=195.187.140.1
DST=83.3.197.202 LEN=28 TOS=0x00 PREC=0x00 TTL=64 ID=33445 PROTO=ICMP TYPE=0
CODE=0 ID=49174 SEQ=37889
> TRACE: mangle:POSTROUTING:policy:2 IN= OUT=eth3 SRC=195.187.140.1
DST=83.3.197.202 LEN=28 TOS=0x00 PREC=0x00 TTL=64 ID=33445 PROTO=ICMP TYPE=0
CODE=0 ID=49174 SEQ=37889
and router respond correctly to ping.
But for asymmetric one (for this localization output route is via eth3 too but
packet arrives via eth2) after PREROUTING chain in mangle table ping packet
enters PREROUTING chain in nat table (there is no nat rule for this addresses)
and get stuck:
> TRACE: raw:PREROUTING:policy:2 IN=eth2 OUT= SRC=89.174.215.22
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=55 ID=49071 PROTO=ICMP TYPE=8
CODE=0 ID=12662 SEQ=260
> TRACE: mangle:PREROUTING:rule:1 IN=eth2 OUT= SRC=89.174.215.22
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=55 ID=49071 PROTO=ICMP TYPE=8
CODE=0 ID=12662 SEQ=260
> TRACE: mangle:tcpre:return:1 IN=eth2 OUT= SRC=89.174.215.22
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=55 ID=49071 PROTO=ICMP TYPE=8
CODE=0 ID=12662 SEQ=260
> TRACE: mangle:PREROUTING:policy:2 IN=eth2 OUT= SRC=89.174.215.22
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=55 ID=49071 PROTO=ICMP TYPE=8
CODE=0 ID=12662 SEQ=260
> TRACE: nat:PREROUTING:rule:1 IN=eth2 OUT= SRC=89.174.215.22
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=55 ID=49071 PROTO=ICMP TYPE=8
CODE=0 ID=12662 SEQ=260
> TRACE: nat:dnat:rule:1 IN=eth2 OUT= SRC=89.174.215.22 DST=195.187.140.1
LEN=28 TOS=0x00 PREC=0x00 TTL=55 ID=49071 PROTO=ICMP TYPE=8 CODE=0 ID=12662
SEQ=260
> TRACE: nat:net_dnat:return:30 IN=eth2 OUT= SRC=89.174.215.22
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=55 ID=49071 PROTO=ICMP TYPE=8
CODE=0 ID=12662 SEQ=260
> TRACE: nat:dnat:return:26 IN=eth2 OUT= SRC=89.174.215.22 DST=195.187.140.1
LEN=28 TOS=0x00 PREC=0x00 TTL=55 ID=49071 PROTO=ICMP TYPE=8 CODE=0 ID=12662
SEQ=260
> TRACE: nat:PREROUTING:policy:2 IN=eth2 OUT= SRC=89.174.215.22
DST=195.187.140.1 LEN=28 TOS=0x00 PREC=0x00 TTL=55 ID=49071 PROTO=ICMP TYPE=8
CODE=0 ID=12662 SEQ=260
I suspect changed behavior of new kernel or new Shorewall.
I cannot test new Shorewall with old system.
There is side effect in new system: two daemons looking for ARP (arpwatch and
ntop) in new system are consuming all processor cores time.
Maybe You know any settings solving this.
Best Regards
--
Andrzej Odyniec
<anody@macrologic.pl>
Rada Nadzorcza Macrologic SA
ul. Chrościckiego 49, 02-414 Warszawa
tel. +48(22)8637681x132, kom. +48(601)276572
ul. Kłopotowskiego 22, 03-717 Warszawa
tel. +48(22)5118115, fax: +48(22)5118117
Rejestr: Sąd Rejonowy dla m.st. Warszawy,
XIII Wydział Gospodarczy Krajowego
Rejestru Sądowego, numer 0000045462
Numer identyfikacji podatkowej: PL 522-000-28-25
Kapitał zakładowy: 1888719 zł opłacony w całości
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon''s best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev