It is illegal for a F1 to work for a US employer, including your own company, without first obtaining work authorization from CIS. But no law prohibits you from working for yourself.