Jump to content
Not connected, Your IP:

Using CentOS 6 : Is it possible to restrict use of AirVPN to Firefox

Recommended Posts



i am a new user and happily enjoying the great airvpn service


i am Using CentOS 6 :My question is ,is it possible to restrict use of AirVPN to Firefox ?


meaning i dont want to use VPN connection for other applications, i just want to use AirVPN with Firefox ?


is it possible and how



Share this post

Link to post

Certainly possible but not trivial, it's quite a bit of work. You would need

  • to add the option "route-nopull" to the openvpn config file (preventing openvpn to set a default route)
  • a separate user account (let's call it: vpnuser) to run Firefox etc. (through sudo or su)
  • iptables rules to mark vpnuser's packets
  • a bash script to create a route for vpnuser, executed whenever the tun0 interface goes up
  • disable reverse path filtering

An example of something like this can be found in this blog post but it's not tailored to CentOS.


Another (not very elegant, but much simpler) solution would be:

  • run OpenVPN on another box (could even be a lightweight virtual machine! Also, don't forget to firewall it against non-VPN traffic)
  • ssh into that box: "ssh -D 12345 user@the_other_box" (opening the local port 12345 as a SOCKS proxy)
  • configure Firefox to use the SOCKS5 proxy at (sending Firefox' traffic to the other box which is running OpenVPN)

all of my content is released under CC-BY-SA 2.0

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Security Check
    Play CAPTCHA Audio
    Refresh Image

  • Create New...