[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
最近在学习shell反弹这块的时候,在向源主机发送报文的时候,由于不了解公网IP和内网IP的区别,导致在监听端口这块一直没有捕获到信息,后来才知道是因为我用的公司的局域网是192开头的,属于内网,因此只能在内部进行通信,而不能与其他网络互连。因为本网络中的保留地址同样也可能被其他网络使用,如果进行网络互连,那么寻找路由时就会因为地址的不唯一而出现问题。因此总结下内网和公网的区别。
内网,一般来说,也就是局域网
,我们可以把局域网理解成一个小家庭,然后给我们每个家庭的成员都编上号,比如张三是192.168.1.2,李四是192.168.1.3,我们家庭内部形成的网络就是内网,我们在家里交流的时候可以不用喊名字,直接喊编号就行,理解成电脑的话,就相当与一个公司所有的电脑,一个网吧里面所有的电脑,这些都属于内网,也就是局域网,IP地址也都是属于内网IP地址。
公网IP,公网IP地址就是互联网IP,可以理解成我们小家庭,公司,网吧以外的IP地址。我们除了在家里活动和交流,肯定也是需要出去外面活动的,比如,张三想要出门旅游,他首先要出门,这个大门,就可以理解成路由器,只有通过路由器这个门,也叫网关,我们才能出去。
所以内网IP可以理解成路由器以下的IP,公网IP可以理解成路由器以外的IP。因为IPV4的地址是有限的,
不可能给全世界每个人都都分配一个固定的公网IP,所以内网IP就很好的解决了这个问题。内部可以自己内部交流,要出去只要通过路由器转换就可以了。
那么如何判断我们使用的宽带是公网IP还是内网IP呢