Bacteria can resist antibiotics simply by hindering physical access to the interior, where in general antibiotic targets are located. Gram-negative bacteria, protected by the outer membrane, possess in the latter several porins that act as a gate for the exchange of small hydrophilic molecules. These porins are water-filled membrane-protein channels that are considered to be the main pathway for different class of antibiotics, such as beta-lactams and fluoroquinolones. Bacterial strains resistant to antibiotics can either decrease the density of porins expressed in the outer membrane or decrease the porin internal size by mutating a few amino acids. In both cases, understanding how antibiotics diffuse through bacterial porins can help the design of new antibiotics that have better penetrating power. A considerable contribution can be offered by molecular dynamics simulations since reliability of force fields, computer power, and algorithms have considerably increased the predictive power thereof. Large systems, as pores inserted in a membrane, and long simulation runs are now feasible, and the time scale can be even extended via the use of accelerated techniques, such as metadynamics, and combined strategies. The details of interactions and processes, extracted from the simulations, complement experimental findings and also deepen aspects not accessible to experiments. In this paper we will review the results obtained by our group on this topic with a particular focus on possible general criteria that can guide the rational design of new antibacterial compounds.