For sending data from Forwarder to Indexer, you need to mention the IP or DNS name of the indexer, if the ip is changing then it will be a issue as data sending will be stopped. So recommended is to have a static ip.
Did the answer by @vishaltaneja07011993 help provide a working solution to your question? If yes, please don't forget to resolve this post by clicking "Accept". If no, please leave a comment with more feedback.