Serial Port assigned IP/Port

I have configured IP for serial port with tcp port 7045 but when I telnet to that IP I can literarily specify any port I want and it connects. Any way to limit this to only designated ports like 23 and 7045?