找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
楼主: cocor

用p p t p穿透公司内网教程

  [复制链接]
发表于 2019-3-25 01:37 | 显示全部楼层
谢谢分享!!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-25 07:12 来自手机 | 显示全部楼层
謝謝分享。。謝謝
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-25 08:55 | 显示全部楼层
谢谢分享谢谢分享谢谢分享谢谢分享
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-25 09:30 | 显示全部楼层
p p t p吗。。。。。。哦
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-25 09:47 | 显示全部楼层
可以设置静态路由啊
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-25 17:18 | 显示全部楼层
cocor 发表于 2019-3-24 14:36
OPEN比较复杂,可能用户名并没起作用。p p t p是没有问题的

可是在服务端我手动添加路由表,再在客户端按你说的添加转发规则,还是无法访问客户端上级路由网段

点评

看看路由表和NAT表有没有相关规则,应该没有问题的  详情 回复 发表于 2019-3-25 17:25
看看路由表和NAT表有没有相关规则,应该没有问题的  详情 回复 发表于 2019-3-25 17:21
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-3-25 17:21 | 显示全部楼层
csl0524 发表于 2019-3-25 17:18
可是在服务端我手动添加路由表,再在客户端按你说的添加转发规则,还是无法访问客户端上级路由网段

看看路由表和NAT表有没有相关规则,应该没有问题的
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-3-25 17:25 | 显示全部楼层
csl0524 发表于 2019-3-25 17:18
可是在服务端我手动添加路由表,再在客户端按你说的添加转发规则,还是无法访问客户端上级路由网段

看看路由表和NAT表有没有相关规则,应该没有问题的

点评

路由表是添加成功的,以下是这个看下,是不是转发规则没有添加成功? [dushan /opt/home/admin]# iptables -L Chain INPUT (policy DROP) target prot opt source destination ACCEPT all  详情 回复 发表于 2019-3-25 17:29
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-25 17:29 | 显示全部楼层
cocor 发表于 2019-3-25 17:25
看看路由表和NAT表有没有相关规则,应该没有问题的

路由表是添加成功的,以下是这个看下,是不是转发规则没有添加成功?
[dushan /opt/home/admin]# iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTA                                               BLISHED
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
DROP       all  --  anywhere             anywhere             state INVALID
ACCEPT     all  --  anywhere             anywhere
ACCEPT     udp  --  anywhere             anywhere             udp spt:bootps dpt                                               :bootpc
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:1723
ACCEPT     gre  --  anywhere             anywhere
virtual**list    all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere             icmp !echo-request

Chain FORWARD (policy DROP)
target     prot opt source               destination
BWMON      all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
TCPMSS     tcp  --  anywhere             anywhere             tcp flags:SYN,RST/                                               SYN TCPMSS clamp to PMTU
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTA                                               BLISHED
DROP       all  --  anywhere             anywhere             state INVALID
ACCEPT     all  --  anywhere             anywhere
virtual**list    all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere             ctstate DNAT

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain BWMON (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             192.168.0.1
RETURN     all  --  192.168.0.1          anywhere

Chain bfplimit (0 references)
target     prot opt source               destination

Chain upnp (0 references)
target     prot opt source               destination

Chain virtual**list (2 references)
target     prot opt source               destination

点评

查看nat表的命令是iptables -t nat -L,你这是查看的filter表  详情 回复 发表于 2019-3-25 17:30
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-3-25 17:30 | 显示全部楼层
csl0524 发表于 2019-3-25 17:29
路由表是添加成功的,以下是这个看下,是不是转发规则没有添加成功?
[dushan /opt/home/admin]# iptabl ...

查看nat表的命令是iptables -t nat -L,你这是查看的filter表

点评

麻烦再帮忙看一下,服务端内网是192.168.111.0/24,虚拟open v p n网是10.8.0.0/24,客户端内网是192.168.123.0/24,上级路由网段是192.168.0.0/24 [dushan /opt/home/admin]# iptables -t nat -L Chain PREROUT  详情 回复 发表于 2019-3-25 17:36
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-25 17:36 | 显示全部楼层
cocor 发表于 2019-3-25 17:30
查看nat表的命令是iptables -t nat -L,你这是查看的filter表

麻烦再帮忙看一下,服务端内网是192.168.111.0/24,虚拟open v p n网是10.8.0.0/24,客户端内网是192.168.123.0/24,上级路由网段是192.168.0.0/24

[dushan /opt/home/admin]# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
vserver    all  --  anywhere             192.168.0.147
AD_BYBY    tcp  --  anywhere             anywhere             multiport dports www,http-alt
AD_BYBY_DNS_LAN_DG  udp  --  192.168.123.0/24     anywhere             udp dpt:domain

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
SNAT       all  --  192.168.123.0/24     anywhere             to:192.168.0.147
MASQUERADE  all  --  192.168.123.0/24     anywhere
SNAT       all  --  192.168.123.0/24     192.168.123.0/24     to:192.168.123.1
SNAT       all  --  192.168.111.0/24     anywhere             to:192.168.0.147

Chain AD_BYBY (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere             match-set ad_spec_dst_sp dst
AD_BYBY_LAN_AC  all  --  anywhere             anywhere

Chain AD_BYBY_DNS_LAN_AC (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere             match-set ad_spec_src_bp src
AD_BYBY_DNS_WAN_FW  all  --  anywhere             anywhere             match-set ad_spec_src_fw src
AD_BYBY_DNS_WAN_AC  all  --  anywhere             anywhere             match-set ad_spec_src_ac src
AD_BYBY_DNS_WAN_AC  all  --  anywhere             anywhere

Chain AD_BYBY_DNS_LAN_DG (1 references)
target     prot opt source               destination
RETURN     udp  --  anywhere             dushan.lan
RETURN     udp  --  anywhere             google-public-dns-a.google.com
AD_BYBY_DNS_LAN_AC  all  --  anywhere             anywhere

Chain AD_BYBY_DNS_WAN_AC (2 references)
target     prot opt source               destination
AD_BYBY_DNS_WAN_FW  all  --  anywhere             anywhere

Chain AD_BYBY_DNS_WAN_FW (2 references)
target     prot opt source               destination
DNAT       all  --  anywhere             anywhere             to:8.8.8.8

Chain AD_BYBY_LAN_AC (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere             match-set ad_spec_src_bp src
AD_BYBY_to  all  --  anywhere             anywhere             match-set ad_spec_src_fw src
AD_BYBY_WAN_AC  all  --  anywhere             anywhere             match-set ad_spec_src_ac src
AD_BYBY_WAN_AC  all  --  anywhere             anywhere

Chain AD_BYBY_WAN_AC (2 references)
target     prot opt source               destination
AD_BYBY_to  all  --  anywhere             anywhere             match-set adbybylist dst
AD_BYBY_to  all  --  anywhere             anywhere             match-set cflist dst
AD_BYBY_to  all  --  anywhere             anywhere

Chain AD_BYBY_to (4 references)
target     prot opt source               destination
REDIRECT   tcp  --  anywhere             anywhere             redir ports 8118

Chain upnp (0 references)
target     prot opt source               destination

Chain upnp-post (0 references)
target     prot opt source               destination

Chain vserver (1 references)
target     prot opt source               destination

点评

服务端和客户端通信一定不能设置成NAT模式,否则是不能由服务端访问客户端的。可以查看服务端的NAT表,看看是不是采用了NAT模式  详情 回复 发表于 2019-3-25 19:50
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-3-25 19:50 来自手机 | 显示全部楼层
csl0524 发表于 2019-3-25 17:36
麻烦再帮忙看一下,服务端内网是192.168.111.0/24,虚拟open v p n网是10.8.0.0/24,客户端内网是192.168 ...

服务端和客户端通信一定不能设置成NAT模式,否则是不能由服务端访问客户端的。可以查看服务端的NAT表,看看是不是采用了NAT模式

点评

不懂怎么看,麻烦帮忙看下 # iptables -t nat -L Chain PREROUTING (policy ACCEPT) target prot opt source destination vserver all -- anywhere 124.91.80.175 AD_BYB  详情 回复 发表于 2019-3-25 20:23
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-25 20:23 | 显示全部楼层
cocor 发表于 2019-3-25 19:50
服务端和客户端通信一定不能设置成NAT模式,否则是不能由服务端访问客户端的。可以查看服务端的NAT表,看 ...

不懂怎么看,麻烦帮忙看下

[PDCN-1 /home/root]# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
vserver    all  --  anywhere             124.91.80.175
AD_BYBY    tcp  --  anywhere             anywhere             multiport dports www,http-alt
SS_SPEC_LAN_DG  tcp  --  anywhere             anywhere             multiport dports ssh,www,https
SS_SPEC_DNS_LAN_DG  udp  --  192.168.111.0/24     anywhere             udp dpt:domain
AD_BYBY_DNS_LAN_DG  udp  --  192.168.111.0/24     anywhere             udp dpt:domain

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
REDIRECT   tcp  --  anywhere             resolver2.opendns.com  tcp dpt:https redir ports 1090
REDIRECT   tcp  --  anywhere             resolver1.opendns.com  tcp dpt:https redir ports 1090
REDIRECT   tcp  --  anywhere             google-public-dns-b.google.com  tcp dpt:domain redir ports 1090
REDIRECT   tcp  --  anywhere             google-public-dns-a.google.com  tcp dpt:domain redir ports 1090
SS_SPEC_WAN_DG  tcp  --  anywhere             anywhere

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
SNAT       all  --  192.168.111.0/24     anywhere             to:124.91.80.175
MASQUERADE  all  --  192.168.111.0/24     anywhere
SNAT       all  --  10.8.0.0/24          anywhere             to:124.91.80.175
SNAT       all  --  192.168.111.0/24     192.168.111.0/24     to:192.168.111.1

Chain AD_BYBY (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere             match-set ad_spec_dst_sp dst
AD_BYBY_LAN_AC  all  --  anywhere             anywhere

Chain AD_BYBY_DNS_LAN_AC (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere             match-set ad_spec_src_bp src
AD_BYBY_DNS_WAN_FW  all  --  anywhere             anywhere             match-set ad_spec_src_fw src
AD_BYBY_DNS_WAN_AC  all  --  anywhere             anywhere             match-set ad_spec_src_ac src
AD_BYBY_DNS_WAN_AC  all  --  anywhere             anywhere

Chain AD_BYBY_DNS_LAN_DG (1 references)
target     prot opt source               destination
RETURN     udp  --  anywhere             PDCN-1.lan
RETURN     udp  --  anywhere             google-public-dns-a.google.com
AD_BYBY_DNS_LAN_AC  all  --  anywhere             anywhere

Chain AD_BYBY_DNS_WAN_AC (2 references)
target     prot opt source               destination
AD_BYBY_DNS_WAN_FW  all  --  anywhere             anywhere

Chain AD_BYBY_DNS_WAN_FW (2 references)
target     prot opt source               destination
DNAT       all  --  anywhere             anywhere             to:8.8.8.8

Chain AD_BYBY_LAN_AC (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere             match-set ad_spec_src_bp src
AD_BYBY_to  all  --  anywhere             anywhere             match-set ad_spec_src_fw src
AD_BYBY_WAN_AC  all  --  anywhere             anywhere             match-set ad_spec_src_ac src
AD_BYBY_WAN_AC  all  --  anywhere             anywhere

Chain AD_BYBY_WAN_AC (2 references)
target     prot opt source               destination
AD_BYBY_to  all  --  anywhere             anywhere             match-set adbybylist dst
AD_BYBY_to  all  --  anywhere             anywhere             match-set cflist dst
AD_BYBY_to  all  --  anywhere             anywhere

Chain AD_BYBY_to (4 references)
target     prot opt source               destination
REDIRECT   tcp  --  anywhere             anywhere             redir ports 8118

Chain SS_SPEC_DNS_LAN_AC (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere             match-set ss_spec_src_bp src
SS_SPEC_DNS_WAN_FW  all  --  anywhere             anywhere             match-set ss_spec_src_fw src
SS_SPEC_DNS_WAN_AC  all  --  anywhere             anywhere             match-set ss_spec_src_ac src
SS_SPEC_DNS_WAN_AC  all  --  anywhere             anywhere             match-set ss_spec_src_gfw src
SS_SPEC_DNS_WAN_AC  all  --  anywhere             anywhere             match-set ss_spec_src_chn src
RETURN     all  --  anywhere             anywhere

Chain SS_SPEC_DNS_LAN_DG (1 references)
target     prot opt source               destination
RETURN     udp  --  anywhere             PDCN-1.lan
RETURN     udp  --  anywhere             google-public-dns-a.google.com
SS_SPEC_DNS_LAN_AC  all  --  anywhere             anywhere

Chain SS_SPEC_DNS_WAN_AC (3 references)
target     prot opt source               destination
SS_SPEC_DNS_WAN_FW  all  --  anywhere             anywhere

Chain SS_SPEC_DNS_WAN_FW (2 references)
target     prot opt source               destination
DNAT       all  --  anywhere             anywhere             to:8.8.8.8

Chain SS_SPEC_LAN_AC (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere             match-set ss_spec_src_bp src
SS_SPEC_WAN_FW  all  --  anywhere             anywhere             match-set ss_spec_src_fw src
SS_SPEC_WAN_AC  all  --  anywhere             anywhere             match-set ss_spec_src_ac src
SS_SPEC_WAN_GFW  all  --  anywhere             anywhere             match-set ss_spec_src_gfw src
RETURN     all  --  anywhere             anywhere             match-set ss_spec_src_gfw src
SS_SPEC_WAN_CHN  all  --  anywhere             anywhere             match-set ss_spec_src_chn src
RETURN     all  --  anywhere             anywhere             match-set ss_spec_src_chn src
RETURN     all  --  anywhere             anywhere

Chain SS_SPEC_LAN_DG (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere             match-set ss_spec_dst_sp dst
SS_SPEC_LAN_AC  all  --  anywhere             anywhere

Chain SS_SPEC_WAN_AC (2 references)
target     prot opt source               destination
SS_SPEC_WAN_FW  all  --  anywhere             anywhere             match-set ss_spec_dst_fw dst
RETURN     all  --  anywhere             anywhere             match-set ss_spec_dst_bp dst
SS_SPEC_WAN_GFW  all  --  anywhere             anywhere

Chain SS_SPEC_WAN_CHN (2 references)
target     prot opt source               destination
SS_SPEC_WAN_FW  all  --  anywhere             anywhere             match-set ss_spec_dst_fw dst
RETURN     all  --  anywhere             anywhere             match-set ss_spec_dst_bp dst
RETURN     all  --  anywhere             anywhere             match-set ss_spec_dst_sh dst
SS_SPEC_WAN_FW  all  --  anywhere             anywhere

Chain SS_SPEC_WAN_CHNGFW (0 references)
target     prot opt source               destination
SS_SPEC_WAN_GFW  all  --  anywhere             anywhere
SS_SPEC_WAN_CHN  all  --  anywhere             anywhere

Chain SS_SPEC_WAN_DG (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere             match-set ss_spec_dst_sp dst
SS_SPEC_WAN_AC  tcp  --  anywhere             anywhere             multiport dports ssh,www,https

Chain SS_SPEC_WAN_FW (7 references)
target     prot opt source               destination
REDIRECT   tcp  --  anywhere             anywhere             redir ports 1090

Chain SS_SPEC_WAN_GFW (3 references)
target     prot opt source               destination
SS_SPEC_WAN_FW  all  --  anywhere             anywhere             match-set ss_spec_dst_fw dst
RETURN     all  --  anywhere             anywhere             match-set ss_spec_dst_bp dst
SS_SPEC_WAN_FW  all  --  anywhere             anywhere             match-set gfwlist dst
SS_SPEC_WAN_FW  all  --  anywhere             anywhere             match-set cflist dst
RETURN     all  --  anywhere             anywhere

Chain SS_SPEC_WAN_KCPTUN (0 references)
target     prot opt source               destination
REDIRECT   tcp  --  anywhere             anywhere             redir ports 1091

Chain upnp (1 references)
target     prot opt source               destination
DNAT       udp  --  anywhere             anywhere             udp dpt:mdns to:192.168.111.144:5353
DNAT       tcp  --  anywhere             anywhere             tcp dpt:38888 to:192.168.111.110:38888
DNAT       udp  --  anywhere             anywhere             udp dpt:62906 to:192.168.111.103:62906
DNAT       udp  --  anywhere             anywhere             udp dpt:58557 to:192.168.111.103:58557
DNAT       udp  --  anywhere             anywhere             udp dpt:52120 to:192.168.111.103:52120

Chain upnp-post (0 references)
target     prot opt source               destination

Chain vserver (1 references)
target     prot opt source               destination
DNAT       tcp  --  anywhere             anywhere             tcp dpt:8181 to:192.168.111.1:801
DNAT       tcp  --  anywhere             anywhere             tcp dpt:9321 to:192.168.111.1
DNAT       tcp  --  anywhere             anywhere             tcp dpt:9322 to:192.168.111.1
DNAT       tcp  --  anywhere             anywhere             tcp dpt:8864 to:192.168.111.3:21
upnp       all  --  anywhere             anywhere

点评

没什么问题,看看两个路由的路由表对不对  详情 回复 发表于 2019-3-25 21:02
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-3-25 21:02 来自手机 | 显示全部楼层
csl0524 发表于 2019-3-25 20:23
不懂怎么看,麻烦帮忙看下

# iptables -t nat -L

没什么问题,看看两个路由的路由表对不对
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-25 21:43 | 显示全部楼层
学习一下看看
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-3-29 10:28

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表