You create a firewall rule allowing ICMP on the interface with the corresponding IP.OPNSense will respond by default if it gets a echo request.