问题原文
原帖链接 · Artur · CC BY-SA 3.0
I have OpenVPN server on VPS, I'm working on windows 8.1 and I want pass only certain ports throught VPN (eg. 3000, 3001). Is it possible from windows?
已采纳解答
原帖链接 · Esa Jokinen · CC BY-SA 3.0
OpenVPN has two modes:
- TAP (Network Tapping System) that simulates a link layer (OSI layer 2) device. In this mode both ends can be on the same subnet (e.g.
10.0.0.0/24) and information are carried by ethernet frames, creating network bridge. - TUN (network TUNnel) that simulates internet layer (OSI network layer, layer 3) device and carries IP packets.
Both modes allows you to either use the VPN for all traffic (default route to 0.0.0.0/0 on the remote side) or just the traffic within the same subnet (TAP) or to all or some subnets on the other end (TUN).
TCP and UDP (where you have the port numbers) works on the transport layer (/OSI layer 4). Therefore it is not a feature neither OpenVPN nor Windows can have but a protocol level limitation on all VPN implementations: It is not possible with (Open)VPN, but it'll be possible to configure at firewall.
You can:
- If you don't route all traffic through the VPN, you can use different interfaces for different ports, e.g. public http://example.com:80 vs. private
172.16.0.30:3001for your Nessus client(?) - Use SSH tunneling instead of VPN,
ssh -L 3001:localhost:3001 [email omitted](Local Port Forwarding) or PuTTY (Connection > SSH > Tunnels: Source port3001& Destinationlocalhost:3001, Local, Auto). This will bind the service to a port on your local machine i.e. you can connect tolocalhost:3001. (It is also possible to use different source port on local side.)
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
