Sanjay Verma
Sanjay Verma

Reputation: 1636

Through a C++ program, how to prevent making network connections, accessing/modifying server files?

I have created a web server on amazon cloud EC2 for online compilation and running C++ code. However, I am afraid anyone can access the server files through the C++ program, or can make network socket. Is it possible to execute a program on server in a way that is harmless to the server itself.

Is there a way to block certain commands to be compiled through the GCC-C++ compiler? I have heard of sandboxing through plash (http://plash.beasts.org/index.html), however, this seems to be a very old project not under development.

Upvotes: 0

Views: 120

Answers (1)

Medinoc
Medinoc

Reputation: 6618

Run the code in a separate process, as an user with limited rights.

Upvotes: 1

Related Questions