Hi RyanLee ,
No it's not correct, you need M12 ethernet 8pin X-coded connector, see docs here. If it's 4pin I assume it can only go up to 100mbps (instead of 1000mbps). Otherwise, I'm quite sure you could also get longer M12 ethernet connectors as well. Thoughts?
Thanks, Erik