First off I am a complete noob to networking. so I am setting up an xmpp server and I have gotten it mostly working. I set it up and portforwarded the 5222 port so I am able to connect to it externally with a dynamic DNS I have set for my external IP address. I just need to figure out how to connect my computer which is on the lan with the server. I can't get it to connect to the external ip. A quick google search told me to turn of the Loopback prevention in my router but I could not find such a setting. Any ideas?
Use your local ip address of the server.
You might also want to try scanning the port (5222) with canyouseeme.org or something similar. If you get nothing, you might have a firewall setting messed up on either the router or the machine. Linux usually does okay (unless you mess around with iptables defaults) but Windows Firewall tends to act like a turd more often.
ok if I do that it just says unkown host
yeah it says it is fine
You can't connect to an internal ip with the external ip unless something is very wrong with your configuration
You can with port forwarding, he doesn't mean on every port, he just means one port (as he said in the OP)
yes the port is pointing towards the server.
Can you connect to it from outside the LAN? Because even if the port if forwarded the server may still have a firewall which is blocking access.
Don't use your external IP if your client is on the LAN, use the LAN address of the server instead. You can use the external address if your router supports NAT reflection but it won't work if it doesn't. If you want you can add your DDNS name to the hosts file of the client computer and point it to your server's local address. This way if you try to access your dns name it will go to the server rather than resolving your external address.
alright so I can connect to it outside of the lan and I have tried using the servers internal IP address (host unknown) and sorry if this is a noob question but how do I
It won't help you if you can't access the server. It doesn't make much sense that you can't access the server from the LAN but you can from the internet.
Yeah the even weirder thing is I just remembered back when I first set it up it worked totally fine. I used my phone going over data to send a message to my computer and vice versa. But now if I try to do that same setup and it doesn't work.
What IPs does the service serve? Did you set it to listen only to the external address or any address?
First, check antivirus and especially firewall settings on the machine you're trying to use to connect with (the client). My bet is you're locally blocking port 5222 (or whatever) on your client PC and that's what's giving you problems. Or it could even be trying to use the wrong port(s)!
Also, assuming you haven't done something weird like segment your LAN (by subnetting it into different local LAN's somehow) you should be able to connect without worrying about any port forwarding at all. You only need to worry about port forwarding (on your router) when something outside your LAN (aka your local "network") is trying to get through. So, if everything is internal and it's all connected through your one and only router, external access to/from the internet (and any port forwarding) be damned, you should be good to go. Of course, that also assumes you're not doing more weird stuff like re-routing ports with a typically unnecessary internal DNS server, or an adjusted "hosts" file, or something funny like that.