Trying to control ethernet port in a raw fashion
This is not electrically possible.  The connector is the same, yes, but what it is connected to internally is completely incompatible.  You're going to have to buy or build some sort of interface board.  A small microcontroller may be the best solution for this, either providing a completely self-contained solution or control via USB, serial, ethernet, or some other interface.