Limit inboud connection on time based ?

Hi !
Is it possible to limit a connection’s connection-time based on the dst. Port (inboud from internet).
I have a webcam but I don’t want people to watch it continually. I would like the connection to be dropped after 2 mins, or blacklisted for 2 mins.