Some-Shell/pve/port_forward
2024-07-04 10:59:39 +08:00
..
port_forward.sh 更新 pve/port_forward/port_forward.sh 2024-07-04 10:59:39 +08:00
README.md 添加 pve/port_forward/README.md 2024-07-04 10:49:53 +08:00

pve 端口转发配置脚本

使用说明

这个脚本适配了 pve 实现端口转发的功能

使用方法

列出当前端口转发

curl -s https://git.randallanjie.com/Randall/Some-Shell/raw/branch/main/pve/port_forward/port_forward.sh | bash -s list

添加端口转发

  1. 添加 ipv4 端口转发
curl -s https://git.randallanjie.com/Randall/Some-Shell/raw/branch/main/pve/port_forward/port_forward.sh | bash -s add ipv4 1822 10.0.18.2 22
  1. 添加 ipv6 端口转发
curl -s https://git.randallanjie.com/Randall/Some-Shell/raw/branch/main/pve/port_forward/port_forward.sh | bash -s add ipv6 1822 fd00:18::2 22

删除端口转发

  1. 删除 ipv4 端口转发
curl -s https://git.randallanjie.com/Randall/Some-Shell/raw/branch/main/pve/port_forward/port_forward.sh | bash -s delete ipv4 1822
  1. 删除 ipv6 端口转发
curl -s https://git.randallanjie.com/Randall/Some-Shell/raw/branch/main/pve/port_forward/port_forward.sh | bash -s delete ipv6 1822

修改端口转发

  1. 修改 ipv4 端口转发
curl -s https://git.randallanjie.com/Randall/Some-Shell/raw/branch/main/pve/port_forward/port_forward.sh | bash -s modify ipv4 1822 1823 10.0.18.2 22
  1. 修改 ipv6 端口转发
curl -s https://git.randallanjie.com/Randall/Some-Shell/raw/branch/main/pve/port_forward/port_forward.sh | bash -s modify ipv6 1822 1823 fd00:18::2 22