Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

连接minivtun之后如何访问服务器的内网网卡呢? #16

Open
threekidney opened this issue Oct 10, 2017 · 0 comments
Open

连接minivtun之后如何访问服务器的内网网卡呢? #16

threekidney opened this issue Oct 10, 2017 · 0 comments

Comments

@threekidney
Copy link

threekidney commented Oct 10, 2017

centos6服务端执行
/usr/sbin/minivtun -l 0.0.0.0:12398 -a 10.8.8.8/24 -n vnet0 -e '123123' -t aes-256 -d

iptables -t nat -A POSTROUTING -s 10.8.8.0/24 -o eth0 -j SNAT --to-source 10.104.232.195

客户端为openwrt中的minivtun客户端,连接上之后能正常经过访问外网,客户端跟服务器也能正常互ping,现在需求客户端能访问服务器端的内网网卡ip,服务器端应该要再怎么设置呢?
服务端 route :
[root@VM_232_195_centos ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.8.8.0 0.0.0.0 255.255.255.0 U 0 0 0 vnet0
10.104.192.0 0.0.0.0 255.255.192.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
0.0.0.0 10.104.192.1 0.0.0.0 UG 0 0 0 eth0

服务器为单网卡:

eth0 Link encap:Ethernet HWaddr 52:54:00:B3:3E:A9
inet addr:10.104.232.195 Bcast:10.104.255.255 Mask:255.255.192.0

请求大神抽空帮忙解答一下,感激不尽!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant