全球主机交流论坛
标题: cubepaas使用nftables进行中转教程 [打印本页]
作者: zdszf 时间: 2020-9-9 12:50
标题: cubepaas使用nftables进行中转教程
本帖最后由 zdszf 于 2020-9-9 12:51 编辑
注册和一般设置参考: /thread-741585-1-1.html
楼主使用的是gost,这里我们可以使用nftables,免去修改host和下载gost的步骤。
以下引用自: https://obvps.com/2020/09/08/nft908.html
卸载iptables,安装启用nftables:
apt purge iptables -y
apt install nftables -y; systemctl enable nftables; systemctl restart nftables
创建转发规则/etc/nft.diy文件,文件每行为一个转发规则,支持端口段第一个为本地端口,第二个为远程域名或IP,第三个为远程端口,以下内容请按需修改
cat <<EOF > /etc/nft.diy
20103/bing.com/443
20104-20108/1.1.1.1/443
30000-30108/www.example.com/30000-30108
EOF
执行脚本,配置端口转发
bash <(curl -s https://raw.githubusercontent.com/mixool/across/master/nftables/nft-nat.sh)
执行时会有sysctl报错 忽略皆可,我猜默认已经开启了吧。
中转oracle韩国和kinto都蛮不错的。
最后可以走下邀请连接: https://cubepaas.com/?spread=87a00bebda0f4fb385e712748f070e0045xkuu7dz2
作者: cooc123 时间: 2020-9-9 14:00
kinto 提供的域名怎么弄IP转发
作者: zdszf 时间: 2020-9-9 14:13
脚本支持域名,脚本其实就是ping了得到IP再设置的
作者: vickyFast 时间: 2020-9-9 14:39
NICE NICE NICE 棒棒哒
作者: cxuqry 时间: 2020-9-9 14:42
mark,学习学习。
作者: tssz 时间: 2020-9-9 14:59
搭个车。
https://cubepaas.com/?spread=12a4e278d7cb42dc9a23b8dedd79c622pfmdinrw4k
作者: 迷路小刀 时间: 2020-9-9 15:05
本帖最后由 迷路小刀 于 2020-9-9 15:09 编辑
V2连不上ibm,
cat <<EOF > /etc/nft.diy
443/ibm域名/443
EOF
443的nat映射是42366
V2客户端设置的是nat机的IP和映射端口42366,telnet能通,死活连不上,
V2客户端设置ibm域名+端口裸连IBM又能连。。
作者: Waylon 时间: 2020-9-9 15:14
本帖最后由 Waylon 于 2020-9-9 15:46 编辑
还是习惯用iptables或者firewall
- # iptables
- iptables -t nat -F
- iptables -t nat -A POSTROUTING -j MASQUERADE
- iptables -t nat -A PREROUTING -p tcp --dport 8080 -j DNAT --to-destination 192.168.10.10:3000
- service iptables save
- iptables -t nat -nL --line
复制代码
- #firewall
- firewall-cmd --permanent --zone=public --add-masquerade
- firewall-cmd --permanent --zone=public --add-forward-port=proto=8080:proto=tcp:toaddr=192.168.10.10:toport=3000
- firewall-cmd --reload
- firewall-cmd --zone=public --list-all
复制代码
作者: zdszf 时间: 2020-9-9 15:19
迷路小刀 发表于 2020-9-9 15:05
V2连不上ibm,
cat
伪装域名要填IBM的域名
作者: zdszf 时间: 2020-9-9 15:21
Waylon 发表于 2020-9-9 15:14
还是习惯用iptables或者firewall
顶!
我不会用iptables,直接学了nftables的用法。。
作者: 迷路小刀 时间: 2020-9-9 15:22
填了的,估计被撸炸了,有时telnet都不通了,MJJ真的猛。。
作者: zdszf 时间: 2020-9-9 15:28
何不用heroku或者kintohub呢
https://github.com/mixool/v2ray
作者: 迷路小刀 时间: 2020-9-9 15:35
heroku在用,高峰期也是炸得不行,CF自选节点。。
作者: Waylon 时间: 2020-9-9 15:45
刚 FRP 成功了,,,开心
作者: laogui 时间: 2020-9-9 15:57
虽然没有,但也进来学习下
作者: daniu 时间: 2020-9-10 13:02
https://cubepaas.com/?spread=258aae51ce9e46729313105c85bac69bctm4gmfhun
使用邀请码 “a6ff7dc9” 尽快完成注册避免失效。
| 欢迎光临 全球主机交流论坛 (/) |
Powered by Discuz! X3.4 |