This shows you the differences between two versions of the page.
— |
wiki:port_forwarding_explanation [2021/09/30 18:47] (current) admin created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | Alot of people are confused about port forwarding and why it would be necessary, below is a bit of an explanation. | ||
+ | ok so to explain port forwarding you really need to know how your computer connects to the internet. | ||
+ | |||
+ | so there are 2 types of IP addresses that we care about for this subject, private and public. if you run ipconfig, or ifconfig in your command line you'll see your computers private address, it'll look similiar to every other address on the same network as you, typically on a home network, the first three numbers will be the same across all devices connected to your router, 192.168.1.1, | ||
+ | |||
+ | if you google “what' | ||
+ | |||
+ | That's where port forwarding comes in. Port forwarding is something you set up on your router that tells it, “Hey any connections originating from the internet coming back to use on this specific port, go a head and send it to this device” so any traffic looking to connect to the port you specify will be forwarded to a specific device on your network. For example if I wanted a reverse shell that connects back to me from the internet I would need to tell my shellcode to send the traffic back to my public ip, and then I'd have to tell my router that any traffic connecting to that port should be sent to my attacking pc. | ||
+ | |||
+ | Or you can avoid this entirely by using a VPS that's already in the cloud and has a public interface, or using NGROK to do some tunnel-y fun stuff, but I'll leave that for you to google and perhaps me to write about another time. |