What do you mean by virtual router? A router running in a virtual machine such as VMWare or Xen? Something else?
If you just want to route packets from one network to another it is easily possible and there are numerous tutorials on the Internet such as the IP masquerading howto
which will help you set up a NAT router. If you Google around a bit for "linux router" you'll find a lot more. If you need more than this you need to be more specific about what you want.