Facebook CEO and co-founder Mark Zuckerberg took a veiled shot at Donald Trump on Tuesday, criticizing the “fearful voices calling for building walls.” But it was just several years ago that Zuckerberg himself sought to protect his $30 million Palo Alto home from outsiders by purchasing four nearby houses.

“We’ve gone from a world of isolated communities to one global community, and we are all better off for it,” Zuckerberg said at a Facebook developer’s conference in San Francisco, The Hill reports. “But now, as I look around and I travel around the world, I’m starting to see people and nations turning inward — against this idea of a connected world and community.”

“I hear fearful voices calling for building walls and distancing people they label as others, for blocking free expression, for slowing immigration, reducing trade and, in some cases around the world, even cutting access to the internet,” he added.

Zuckerberg did not refer to Trump or any other U.S. politician by name, but the target of his remarks was clear. The Harvard University dropout has made immigration reform one of his chief priorities. In 2013 the multi-billionaire started the lobbying group FWD.us as part of that effort.

But despite his open borders, anti-fence rhetoric, Zuckerberg has supported barriers to entry when it comes to his personal turf.

In 2013 he spent $30 million to purchase four houses surrounding his five-bedroom abode in Palo Alto. The website Gawker reported the next year that Zuckerberg’s property “had a massive mesh net fence erected” around it.

Alabama Sen. [crscore]Jeff Sessions[/crscore], one of the staunchest opponents of immigration reform in the Senate and an adviser to Trump, criticized Zuckerberg’s hypocrisy at the time.

“Well, the ‘masters of the universe’ are very fond of open borders as long as these open borders don’t extend to their gated compounds and fenced-off estates,” Sessions said during a speech on the Senate floor on Sept. 12, 2014.

“That is a world the average American doesn’t live in,” Sessions said.

Follow Chuck on Twitter