Is it possible to have a TCP connection with an FPGA? I need a low power device that can control relays based on Ethernet packets that are received and send back confirmation packets.
Is it possible? yes
Are there times when you would want to do it? yes
It it the right soloution for the problem you describe? almost certainly not!
FPGAs are great for doing stuff that is simple and repetitive but needs to happen with very tight timings and where the market is too small to justify custom silicon but for lower speed stuff they tend to be an expensive (both in terms of hardware costs and development time) and power hungry option.
Relays are at the opposite end of the speed scale. So using a FPGA to control them seems pretty crazy. Personally for a networked relay controller I would be looking at either a microcontroller based soloution or an embedded linux based soloution depending on the dev/prod cost balance and the features required (it's much easier to add support for things like TLS or web interfaces on a linux based soloution than a microcontroller based soloution).
you can use lantronix Ethernet module. and there are lot of companies who makes board using these modules like this one Ethernet controlled relay so you can get these boards which have relay and Ethernet, which will make controlling relay very easy. all you need to send commands using your master hardware. these lantronix modules also come with inbuilt webpage.