|Castres (7) 16|
|Tries: Taumoepeau Pen: Palis 3 Con: Palis|
|Leinster (9) 21|
|Pens: Madigan 7|
Leinster made it two wins out of two in the European Champions Cup by grinding out a five-point victory over Castres, thanks to seven Ian Madigan penalties.
Saimone Taumoepeau rocked Leinster by rumbling over for a fifth-minute try, which was converted by Geoffrey Palis.
Three Madigan kicks ensured that the Irish province led 9-7 at half-time.
Three Palis penalties saw the hosts establish a seven-point advantage but Madigan responded by kicking 12 points, with Castres salvaging a bonus point.
Castres went into the game on a poor run of form which saw them lie 12th in the French Top 14 and without a point in Champions Cup Pool 2 after suffering a 25-9 defeat by Harlequins last week.
Leinster ended an 18-match unbeaten home run for the French side in last season's tournament and travelled to Stade Pierre Antoine on a high after coming from behind to see off Wasps 25-20 in their opening group fixture in Dublin.
Matt O'Connor's outfit were without injured pair Rob Kearney and Mike Ross, but had Luke Fitzgerald making his first start since March and Gordon D'Arcy playing his 100th European game.
The hosts began the game in aggressive fashion and Remi Tales put the visitors under pressure when he kicked for territory and the ball bounced into touch close to the Leinster line.
Flanker Yannick Caballero won possession at the lineout and the forwards drove over from seven metres out, prop Taumoepeau touching the ball down for the try and Palis converting.
The intensity of the Castres tackling saw them dislodge the ball from their opponents several times, while their defence, porous on so many occasions this season, held firm.
Madigan, playing at inside centre, knocked over his first penalty from in front of the posts in the 17th minute after Argentine forward Ramiro Herrera had chopped down Kane Douglas.
Leinster, three-time winners of the now defunct Heineken Cup, began to gain the upper hand in terms of possession and territory in a relentlessly physical encounter.
Madigan's well-struck attempt from 47 metres sailed between the posts and a further successful kick at goal two minutes before the break nudged the Irish into a two-point lead at the halfway point of a bruising battle.
The Irish international was off-target with a difficult penalty before the break and after Palis put his side in front, Madigan struck the upright with a more straightforward attempt on 46 minutes.
Palis missed with a more long-range kick, but made amends from a similar distance soon after, adding a further penalty to make it 16-9 going into the final quarter.
Two Madigan kicks brought his side to within a point and the number 10 made no mistake from close to the posts with four minutes remaining after Piula Faasalele was penalised for a high tackle on Jamie Heaslip.
A further penalty extended the winning margin and condemned Castres to only their second home defeat this season, effectively ending their hopes of progressing to the quarter-finals of the tournament.
Leinster captain Jamie Heaslip: "We are delighted to get the win - it's a tired changing room in there but a very happy one. We built up some momentum at times but didn't help ourselves on other occasions. We showed a lot of grit to get the result we wanted."
Castres: G Palis; M Evans, C Tuatara, R Cabannes, R Grosso; R Tales (capt), C Garcia; S Taumoepeau, B Mach, R Herrera, R Gray, R Capo Ortega, M Babillot, Y Caballero, P Faasalele
Replacements: M Bonello, M Lazar, Y Montes, C Samson, I Diarra, R Martial, J Dumora, A Dupont.
Leinster: Z Kirchner; D Fanning, G D'Arcy, I Madigan, L Fitzgerald; J Gopperth, I Boss; J McGrath, S Cronin, M Bent; D Toner, K Douglas; R Ruddock, D Ryan, J Heaslip (capt).
Replacements: R Strauss, E Byrne, T Furlong, M McCarthy, J Conan, E Reddan, N Reid, M McGrath.