I'd replace the cable for starters. Also make sure no dust in the RJ-45 network jack. If flexing is still required after replacing a cable, this it could be a bent pin of one of the important 8 pins or a cold solder joint between the connector and the main board. If this is the case then the easiest repair if a laptop is to get a USB Network Adapter, otherwise it would need to be professionally repaired at the main board level. If its a desktop computer you can either go the route of a USB Network Adapter or install a second network adapter internally in in spare unused slot.