Yes,
You must correctly configure IP,Netmask and Gateway for both.
You must be sure to have no firewall between them.