This appears to be a “thru-hull” fitting for a boat!
There are some with fixed flanges; basically a bulkhead fitting with built-in elbow… this is not one of them!
— this variety of thru-hull fitting has a fully threaded body with two jamb nuts; typically to allow for adjustability in tight clearance installs… they require a (usually RTV type) sealant around the threaded body to prevent leaks, this one was somehow sealed with what appears to be a whole roll of Teflon tape!
— measure the hole diameter, and get a proper regular bulkhead fitting with listed dimensions so you know it’ll fit! (Try to avoid the black ABS plastic bulkhead fittings, they’re cheap, and fairly brittle!)