Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a VPN connection to a private VPN server in another country. I don't want any internet packets to leave or enter my laptop unless they are going to or coming from the VPN server's IP.

Is there a way to enforce this using perhaps the built in firewall in Windows 7?

share|improve this question

3 Answers 3

In your settings of the VPN check the Use Default gateway on remote network

In this case ALL packets travel via the secure VPN and leaves the server on that side.

Many times people un-tick this because the internet runs very sluggish.

enter image description here

If you want to verify that it works you can use Fiddler and you can monitor where http packets are going and coming from.

An even more advanced packet sniffer is WireShark and shows the whole design of a packet, source destination and all that.

A firewall is not used to redirect packets. You can , YES, stop packets from leaving, but that would be better to BLOCK ALL INCOMING AND OUTGOING traffic on your router, EXCEPT for VPN tunnel..

share|improve this answer
    
Wont work for me... it's openvpn client software, its not ipsec. –  seticruncher Jan 23 '12 at 17:01
    
block it on the router then.. deny all in and out. Just allow the VPN tunnel, leave windows firewall alone. –  ppumkin Jan 23 '12 at 17:03
    
Have other people use my wireless network that don't use vpn... –  seticruncher Jan 23 '12 at 17:06

openvpn uses a tun/tap virtual NIC, so you have a similar option. All you have to do is to un-tick the auto metric option and set the value to one that is very low like 1. Then you can verify the results by running the command netsh int ip sh route and check if the virtual NIC is listed higher than your physical NIC for the default route (0.0.0.0/0).

This will make sure all your outgoing traffic, except the ones to your local network and the VPN server, goes through the tunnel.

To block incoming traffic, you have two options:

  1. Delete the default route for your physical NIC, so any incoming traffic becomes essentially useless.
  2. Setup a third-party firewall to block all incoming traffic on your physical NIC or its IP address range. I don't think you can't do this with Windows firewall easily.
share|improve this answer

There are basically two connection in Vpn one for Incoming & another for outgoing.

Following are the steps for configuring Incoming VPN Connection in Windows 7

1.First go to Control Panel and open Network and Sharing Center. 2.Click on Change adapter settings. 3.Press Alt+F and select New Incoming connection 4.Put a check on who you’d like to give access to this computer or you can configure a new account by clicking on Add someone,after that click on Next. 5.Put a check mark on Through the Internet. Click on Next. 6.Select the protocols you want to enable for this connection. Click on Allow access. 7.Make a note of the Computer name as this will be used by the client to connect to this computer and after that Click on Close.

Following are the steps for configuring Outgoing VPN Connection in Windows 7

1.First go to Control Panel and open Network and Sharing Center. 2.Click on Set up a new connection or network. 3.Select Connect to a workplace then click on Next. 4.Select Use my internet connection (VPN). 5.Type the IP address or computer name where you wish to connect and your connection name under the Destination name field. 6.Enter a User name and password that has been granted access to the host computer. 7.For getting connected through created VPN connection, you can either right-click on the Network icon in the system tray and select Network and Sharing Center or go to Control Panel and open Network and Sharing Center, and click on Connect to a network. 8.Now connect VPN Connection windows will appears. Hope this helps you.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.