Security issues for the government of Israel include the Jordan Valley, strategic hilltops in the West Bank; protections for the aerial approaches to Ben Gurion International Airport; access and control over the main east-west roads and passes in the West Bank. I am not an expert on this issue, but it is my understanding that such security concerns became an obstacle to a final agreement between the Palestinian Authority and Israeli governments that the United States tried to facilitate during the Obama administration in 2014. Israel does not trust international actors or technology alone to protect border security, while Abbas rejected anything more than a five year Israeli presence inside a Palestinian state. Israel currently has 200-500 troops in the Jordan Valley and wants to retain them there after a peace agreement.
John Kerry recently said that the settlements have nothing to do with security. I know less about the settlements than I do about the Jordan Valley disagreement. It seems to me that Israel thinks of some of the settlements as a form of protection against potential attacks. Maybe they are thinking of what damage can be done by someone who possesses some of the various military weapons that Hamas continuously tries to acquire. Settlements are then located in areas with the highest risks.
Settlements are also located wherever settlers start them. The current government expresses the view that settlements are OK. It appears that the only way to invalidate a settlement in Israel is for the land to be documented to be owned by someone else. Although there are a variety of opinions inside Israel on settlements, the government does not appear to accept the notion, commonly expressed outside of Israel, that settlements are an obstacle to peace or are illegal. A more pluralistic future Palestinian state with towns that were started as settlements arguably provides the potential for a better quality of peaceful coexistence than a Palestinian state with no Jewish citizens. Militant settlers who want to remain where they are as Israeli citizens, along with some right wing Israelis who are not settlers, and Palestinian militants, including Hamas, may try to scuttle such an agreement (a few militant Palestinians tried to scuttle the 2014 negotiations with violence). The settlers would have to choose between leaving or becoming citizens of the Palestinian state. The current Israeli government may have to replace its most right wing coalition partners to continue with a peace deal but I do not think that would be difficult to pull off. Something along these lines appears to me to be the view of the current government of Israel, but I am not aware that they say much publicly about this.
My guess is that settlers who remain without acquiring citizenship could be denied access to utilities such as electricity and water, denied access to banks, denied vehicle licenses, denied entry into neighboring countries, refused employment, detained, maybe deported to another country. I do not know what will happen, but there are multiple ways to create difficulties for them. Uncooperative settlers are a complication, particularly if they are numerous, but I am skeptical that they can block a Palestinian state from forming or functioning.
When two countries sign a treaty, it could be a loan agreement, a trade agreement, a peace agreement, etc., they are usually both exchanging national sovereignty for a benefit. One such possible exchange is to commit to not granting citizenship to anyone who is violating the citizenship laws of the other country. At the same time people who comply with the citizenship requirements of both countries can obtain dual citizenship. This arrangement benefits both countries by supporting their citizenship laws.
The UN and many countries generally, in contrast, prioritize political boundaries such as East Jerusalem (no mention of West Jerusalem), and the pre-1967 line as it was after all of the Jewish residents were forceably expelled by Jordan. Oddly, they fail to make the Golan Heights versus a future Palestinian state distinction. But those political boundaries, land ownership boundaries, and demographic boundaries as they were before 1967 do not always align with Israel's security concerns. Israel recently has had a number of small skirmishes in the vicinity of the Golan Heights. I think it is unlikely that any Israeli government will be willing to evacuate the Golan Heights regardless of how many resolutions are passed at the UN asserting that any non-negotiated changes to the pre-1967 line are not recognized, and regardless of any past offers by Israel to withdraw from the Golan Heights. With respect to Lebanon and whatever Syria becomes, it will be peace for peace or no peace. I predict that there will be no future offer by Israel to return that particular territory Israel captured in the 1967 war. The results of that war with regard to the Golan Heights are final.
Everyone in Israel is not comfortable with the notions that every time Israel offers new concessions in its negotiations with the Palestinians that those concessions are retained and carried over to future negotiations, that every time there is a negotiation the Palestinians use the opportunity to communicate through the press why everyone should think Israel is evil, and that the 1967 war and its outcome are legally invalid while everything starting the week before Israel won that war is legal and retained as the starting point for negotiations. Jordan and Egypt did not behave that way when they negotiated peace with Israel. Reaching an agreement with the Palestinians will be more difficult than I think many people realize. When Netanyahu imposed a 10-month construction freeze on all of Israel's settlements in the West Bank in response to pressure from the Obama administration, the Palestinian Authority rejected the gesture as being insignificant due to the limited construction on some pre-approved housing units, failure to extend the freeze to East Jerusalem, and failure to dismantle already-built settlement outposts. Although Abbas did negotiate anyway in the ninth month, it appears (to me) unlikely that Abbas will change his mind and agree to the concessions that Israel requested, such as a long term Israeli security presence in the Jordan Valley. We do not know who Abbas successor will be or whether his successor will be more accommodating to Israel's security concerns. Nor do I think that Israel's requests for security concessions are going to diminish or change significantly after Netanyahu is replaced. I do not know where the focus on the settlements as a "flagrant violation of international law" will take us, but without Israel's long term security concerns about that volatile region being respected I do not think we are going anywhere we want to be.