We consider the dynamics of a one-dimensional quantum system in the presence of a localized defect. We prepare the system in a short-range entangled state, we let it evolve ballistically, and we study the entanglement across the defect. Linear growth of the entanglement entropy is observed, whose slope depends both on the scattering properties of the defect and the initial state. The protocol above is characterized by Conformal Field Theory, and the Rényi entropies are related to the correlation functions of twist fields in a bounded two-dimensional geometry. Moreover, we investigate a particular lattice realization in a free-fermion chain, giving a prediction for the linear slope via a quasi-particle picture.