Can't connect octoprint with direct ethernet connection

Hello, i am trying to connect my raspberry to the internet of my university via ethernet.
I have all the necessary data: IP adress, default gateway, network mask, 1st DNS and 2nd DNS.
This connection works perfectly in my pc, however, I am having a lot of problems in order to configure the conection in the raspberry with octoprint.
I have tried to define all in /etc/dhcpcd.conf . Nevertheless it hasn't worked.
Any idea?