Especially 
  appealing, in a presidential election cycle where foreign policy is likely to 
  be a major issue, is his purported opposition to our foreign policy of global 
  intervention: his votes against both Gulf wars stand out in stark contrast to 
  Hillary’s record.
Yet his real foreign policy record is closer to Hillary’s than he likes to 
  admit. Yes, he opposed the Iraq war – and then proceeded to routinely vote to 
  fund that war: ditto Afghanistan. In 2003, at the height of the Iraq war hysteria, 
  then Congressman Sanders voted 
  for a congressional resolution hailing Bush:
“Congress expresses the unequivocal support and appreciation of the nation 
  to the President as Commander-in-Chief for his firm leadership and decisive 
  action in the conduct of military operations in Iraq as part of the ongoing 
  Global War on Terrorism.”
As the drumbeat for war with Iran got louder, Rep. Sanders voted for the 
  Iran Freedom Support Act, which codified sanctions imposed since the fall of 
  the Shah and handed out millions to “pro-freedom” groups seeking the overthrow 
  of the Tehran regime. The Bush administration, you’ll recall, was running a 
  regime change operation at that point which gave covert support to Jundullah, 
  a terrorist group responsible for murdering scores of Iranian civilians. Bush 
  was also canoodling with the Mujahideen-e-Khalq, a weirdo cult group 
  once designated as a terrorist organization (a label lifted by Hillary Clinton’s 
  State Department after a well-oiled public relations campaign).
Sanders fulsomely supported the Kosovo war: when shocked 
  antiwar activists visited his Senate office in Burlington, Vermont, he called 
  the cops on them. At a Montpelier public meeting featuring a debate on the war, 
  Bernie argued 
  passionately in favor of Bill Clinton’s “humanitarian” intervention, and pointedly 
  told hecklers to leave if they didn’t like what he had to say. 
As a Senator, his votes on civil liberties issues 
  show a distinct pattern. While he voted against the Patriot Act, in 2006 he 
  voted in favor of making fourteen provisions of the Act permanent, including 
  those that codified the FBI’s authority to seize business records and carry 
  out roving wiretaps. Sanders voted no on the legislation establishing the Department 
  of Homeland Security, but by the time he was in the Senate he was regularly 
  voting for that agency’s ever-expanding budget.
-- Justin Raimondo, "Bernie Sanders: The Ron Paul of the Left?" (Antiwar.com).