We need a better way to stop terrorism and keep America safe

The Orlando mass shooting highlights the need for greater coordination between federal, state and local law enforcement.

Government's responsibility to provide for the common defense is written explicitly in the preamble of our constitution. It identifies protecting our homeland as the most important responsibility of the federal government. When I was 22 years old, I had the honor of directly participating in this role as an undercover officer in the Central Intelligence Agency (CIA).

While collecting intelligence in the back alleys in places like India, Pakistan and Afghanistan, I experienced first-hand the true nature of the threats that our country faces. I saw the commitment and determination of the men and women in the military, diplomatic corps, intelligence agencies and law enforcement who put themselves in harm's way every single day to keep us safe. I also witnessed the direct impact of ill-conceived policies that made us less safe.

In the 17 months that I have been in Congress, I've witnessed the Obama administration's "lead from behind" foreign policy contribute to more global insecurity and instability than it has mitigated. The unfortunate reality is that many of the challenges we face today are the direct result of years of failed policies that have decreased American leadership around the world. Fortunately, those policies are reversible. There is a better way.

Speaker of the House Paul Ryan recently released our plan to restore America's international position to its former level of prominence. Our vision is predicated on these tenets: protecting the homeland, defeating terrorists, tackling new threats, and defending freedom. These pillars served as the foundation of successful U.S. foreign policy throughout the 20th century, and they will do so again in the coming decades.

Keeping Americans safe inside the homeland is our absolute number one priority. It is the cause that motivated me to serve my country in the CIA, and is shared by all men and women who serve this nation abroad. As a member of Congress, I now have the ability to protect the homeland in a different way: by supporting legislation that authorizes necessary changes to the way our security sector operates.

For instance, our growing use of cyber technology has advanced our economy but also rendered us extremely vulnerable. Cyberattacks have the potential to totally disrupt critical infrastructure like power grids, communication systems, and economic facilities. Russia and Iran have already demonstrated they have such capabilities. While this Congress has taken action to address the gaps in our country's cybersecurity, more work needs to be done. This problem is complex and will only become more so as time goes on. If we focus on it now, we will be better prepared to face new cyber challenges in the future.

The U.S. must develop a long-term strategy that addresses every way terrorist groups increase their global influence: their recruitment and radicalization strategies, their sources of income, the ways they acquire weapons. The unfortunate reality is that the terrorist threat is not going away any time soon, and increased dramatically when countries like Iraq, Syria, and Libya destabilized. This was a direct result of the U.S.'s decision to slowly pull away from our global responsibilities over the past eight years.

ISIS took advantage of a crumbling Syria, which we did little to stop. They took over the city of Fallujah in Iraq in January 2014, and President Obama discounted the threat they posed. If there's anything we should take away from the Obama administration's tenure, it is that disengagement is positively correlated with the rise of the terrorist threat. The U.S. must lead a broad coalition of countries to uproot terrorist groups from wherever they control territory. Radical Islamic extremism is a global phenomenon and it will require a global strategy to mitigate.

The U.S. has not kept up with the rapidly changing nature of the threat environment. While our military is more likely to continue engaging in nonconventional conflicts, the structure of the Department of Defense (DoD), the way our forces are trained, and the types of equipment the department purchases all reflect preparation for conventional warfare. Insurgent groups discovered quickly the advantages of fighting this kind of asymmetric conflict. There is a need to reexamine the way the DoD operates to ensure it is the most flexible and efficient military force in the world. As the wars in Iraq and Afghanistan have demonstrated, raw power does not determine military victory — flexibility and efficiency does.

America is the country people around the world look to as the shining example of liberty. They consider us the global champion for human rights and to act when those rights have been violated. Shirking from this responsibility has damaged our international credibility immensely.

We must restore American leadership by speaking up when countries violate the principles of international order. We must demonstrate our commitment to make this world a more free and prosperous place by upholding the promises we have made to our allies.

We will only overcome the new challenges that have emerged in the opening years of the 21st century when we reassert our international influence. Our foreign partners are concerned about our waning engagement. Our enemies have taken advantage of the vacuums our withdrawal has opened up. There is a better way and the House Republican's plan is about strength, engagement and reform. This plan cannot be implemented quickly enough. The stability of the world and the security of our nation depend on it.

Commentary by Will Hurd, a former undercover CIA officer, entrepreneur and cybersecurity expert. He is currently the U.S. representative for the 23rd Congressional District of Texas. In Washington, he serves as vice chair of the Maritime and Border Security Subcommittee on the Committee for Homeland Security, and as the chairman of the Information Technology Subcommittee on the Oversight and Government Reform Committee.

For more insight from CNBC contributors, follow @CNBCopinion on Twitter.