当前位置:网站首页>UFW port forwarding
UFW port forwarding
2022-07-24 17:09:00 【ailx10】
ufw Port forwarding and what we did before iptables Port forwarding is almost the same , If you don't believe it, you can review it again 「ailx10:iptables Port forwarding 」,ufw yes iptables Of unbuntu Series firewall upgrade ,firewall yes iptables Of centos Series firewall upgrade ,firewall Abandoned iptables That set of grammar , Simplified configuration ,ufw Still inherited iptables grammar ,firewall For port forwarding, please refer to my other blog 「ailx10:firewall Port forwarding 」. in general , Port forwarding is very interesting , It can bypass the north-south flow monitoring ~
First step : Configure to allow port forwarding
vim /etc/ufw/sysctl.conf
The second step : Local port forwarding configuration
*nat
:PREROUTING ACCEPT [0:0]
-A PREROUTING -p tcp --dport 8022 -j REDIRECT --to-port 22
COMMIT
The third step : start-up ufw A firewall
ufw allow 22
ufw enable
service ufw start
service ufw status
Step four : Verify local port forwarding
ssh [email protected] -p 8022
Step five : Configure additional ports for remote forwarding
vim /etc/default/ufw
Step six : Configure port remote forwarding , Go directly to iptables Just copy in the experiment
-A PREROUTING -p tcp --dport 13389 -j DNAT --to-destination 192.168.199.185:3389
# PREROUTING chain : Process packets before routing ( Do target address conversion )
# Go to the springboard machine 13389 Port traffic forward To the intranet 3389 port
-A POSTROUTING -p tcp -d 192.168.199.185 --dport 3389 -j SNAT --to-source 192.168.199.247
# POSTROUTING chain : Process packets after routing ( Modify and convert the source address of the data link )
# Go to the intranet 3389 Port traffic Modification source IP It's a springboard machine 
Step seven : see 13389 port , already open

Step eight : Verify remote port forwarding

Network security has a long way to go , Wash and sleep ~

边栏推荐
- Programming language exercises (I)
- Why can't sizeof (ARR) / size (arr[0]) be used to calculate the array length inside the called function?
- Digital transformation must have digital thinking
- CPU comparison
- 别再到处乱放配置文件了!试试我司使用 7 年的这套解决方案,稳的一秕
- Small end format and big end format (little endian & big endian)
- Custom types: Enumeration
- 代码随想录笔记_链表_707设计链表
- jvm类加载子系统
- HCNP Routing&Switching之DHCP中继
猜你喜欢

Qsqldatabase: solution of qmmysql driver not loaded

Kyligence attended the Huawei global smart finance summit to accelerate the expansion of the global market

自定义类型:枚举
![[matlab]: basic knowledge learning](/img/8c/d13597e402c55df6cbd5e008aef0a5.png)
[matlab]: basic knowledge learning

什么是模糊理论,基础,流程

Still developing games with unity? Then you're out. Try unity to build an answer system
[redis] -1. two ways of setting up environment based on docker

【时序逻辑电路】——计数器

Comparison of array and object merging methods assign, merge, defaults, defaultsdeep in lodash

SS-Paper【1】:Fully Convolutional Networks for Semantic Segmentation
随机推荐
1163: SongGe's score splitting (C language)
The orders in the same city are delivered in the same city, and the order explosion is still handy!
Digital transformation must have digital thinking
自定义类型:枚举
Mysql增删改查、检索与约束(详细教学)
What should we pay attention to in the resume of software testing?
Topic 6 - message queue for client communication
Exception handling - a small case that takes you to solve NullPointerException
Analyze the capabilities and scenarios of Apache pulsar, a cloud native message flow system
调整图像亮度的滚动条演示实验
Iftnews | Christie's launched its venture capital department, aiming at Web3 and metauniverse industries
Internet Download Manager配置
图像像素的逻辑操作
Buffer overflow vulnerability lab experiment record
Pat class A - check in and check out
Is it safe for Mr. qiniu to open a securities account? Can I drive it?
CDN(Content Delivery Network)内容分发网络从入门到与实战
JSP custom tag library --foreach
PAT甲级——拼写正确
Want to make sandbox games? Then you must not miss this plug-in (unity3d)