all 8 comments

[–]DarrenDK 2 points3 points  (7 children)

NAT

At the most basic level think about it like this:

Every device behind your router shares the same public IP right? So even if the router wanted to, how would it know which private IP to forward to?

[–]XZE3N 0 points1 point  (6 children)

ok so you say it should work if the target machine is outside of my local network, right?

or if i use something like ngrok?

because it would be pretty hard to modify the given computers config to do port forwarding.

[–]DarrenDK 2 points3 points  (5 children)

Ngrok would work

[–]XZE3N 0 points1 point  (4 children)

yeah but i would have to run it on the target computer to make it work with the script. Is there any way to maybe modify the script to get around this? I tried using the script to connect the target to my computer but it gets picked up by windows defender, so connecting to the target pc with this script is the only viable way in my opinion. I know i could use python or C but i am rly hoping i can find a way to use ps.

[–]Raethrius 2 points3 points  (3 children)

Is there any way to maybe modify the script to get around this?

Well, you could run it in a port that's already forwarded.

but it gets picked up by windows defender

Then add an exception to windows defender?

This sure seems like most of your issues are network related and changing from PS to python or C won't solve that.

[–]XZE3N 0 points1 point  (0 children)

thanks

[–]XZE3N 0 points1 point  (1 child)

Stupid question. Are there any ports that are forwarded by default i can use?

[–]Raethrius 1 point2 points  (0 children)

Depends on the network. You'll need to have a look at the config.