How can i configure custom nameserver to domain provider?

$ whois harshvardhansolanki.com |grep 'Name Server'
Name Server: ns1.harshvardhansolanki.com
Name Server: ns2.harshvardhansolanki.com

So far, so good.

$ host ns1.harshvardhansolanki.com 140.245.16.10
;; communications error to 140.245.16.10#53: timed out
;; communications error to 140.245.16.10#53: timed out
;; no servers could be reached

Not so good. Firewall, wrong IP, or…?

Also, as an aside, if you only have one server, you shouldn’t host your own DNS. Just host it with your registrar, or use one of the supported cloud DNS services (Pro has more cloud DNS options than GPL, but GPL, I think, can manage DNS in Route 53).