Security in wireless body area networks is one of the top concerns; like other networks, several approaches based on cryptography were designed to secure the data from attackers, but security still lacks and raises the burden on the network. Blockchain-based security approaches are nowadays popular among different networks, improving the level of security but reducing the network performance in terms of delay and other performance parameters. So, the primary aim of this work is to propose a lightweight security protocol that provides a higher level of security and improves network performance. In order to attain this, a lightweight blockchain-optimized network (BON) protocol is proposed that utilizes the blockchain for security and soft computing approaches for dynamic clustering and rule-based optimized path. In this, dragonfly optimization forms dynamic clusters, and the fuzzy-based gray wolf selects the optimized path. Moreover, with blockchain technology, the data transmission will be secure, and transmission will occur via the optimized path to provide overall data transmission security. The performance of the proposed solution is analyzed by configuring two different network scenarios using the NS-2 simulator and computing different performance metrics. The results ensure the performance of the proposed protocol over other existing approaches.