Replacing socket for Cat5 cable
I cannot make out from your low-resolution pictures if there's a strain relief or cable tie point built into the socket. Possibly the silver loops on the right side of the third picture? If so, using a cable tie to tie the cable to that would stabilize it. If not, attaching 4 of the unused conductors to the unused contacts will make a better mechanical connection to the cable. If the terminal strip has holes that go all the way through it, moving the wire connections to the &quot;interior&quot; side of that strip may also be helpful as opposed to making the connection on the &quot;exterior&quot; side as at present. Less interference when poking the assembly into a hole in the wall.
These fittings are normally simply installed in the wall, and once placed in the wall they do not move, so no further &quot;enclosure&quot; is needed. You can get &quot;surface mount&quot; boxes which do have a front and back that snap together, if you would prefer that.
While the 4-pair cable probably is Cat5, it is being used as a telephone cable, and is connected to a telephone jack. The only way it's &quot;an internet cable&quot; is via a modem running on the telephone line connecting to the internet. It is not any form of ethernet, despite sharing a physical layer that is used by ethernet.