I need a bit more information about your setup. What target are you using? I'm guessing LIO, since that's the most common (using targetcli), but there are others, and each one is different with respect to ACLs, using passwords, etc.
I use LIO/targetcli, and I usually work with the initiator and target on the same system, no problem. This is a network protocol, so it shouldn't matter if the initiator and target are on the same system or miles apart, as long as they are connected via the network.
With LIO, you have to either add your initiator IQN to the ACL for the target, or you need to put the target in "demo" mode. Though poorly named, demo mode allows connection without ACLs (it generates the ACLs on the fly).
Are you using initiator and/or target name/password protection? If so, that adds a layer of complication. For testing, I do not set up any names/passwords.
How to you try to connect to your target? What distribution are you on and what version of that distro? Do you run iscsi discovery first, then connect? Show us the sequence of commands you use, and the actual error messages you say you are getting?
Are you setting up the target the automatically reconnect on each reboot? If so, the steps you take to do that may differ per distrubution. And what systemd services do you have running?
You need to supply much more information, in general, when asking for technical help. :)