Results 1 to 4 of 4

Thread: Ubuntu PPTPD / PPTP Support - How can I block all sites except one on my VPN?

Hybrid View

  1. #1
    Join Date
    Dec 2012
    Beans
    2

    Ubuntu PPTPD / PPTP Support - How can I block all sites except one on my VPN?

    Hello,

    I have an ubuntu PPTPD VPN set up and working,
    How can i limit it so when users login they can only access 1 website?

    Thanks for your support.
    ZyZy

  2. #2
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Ubuntu PPTPD / PPTP Support - How can I block all sites except one on my VPN?

    Use iptables rules like this:

    Code:
    sudo iptables -A INPUT -i ppp0 -p tcp -d ip.addr.of.site --dport 80 -j ACCEPT
    sudo iptables -A INPUT -i ppp0 -p tcp --dport 80 -j REJECT
    That tells the machine to accept traffic arriving on the ppp0 interface and destined for the machine at ip.addr.of.site. All other traffic on ppp0 destined for a remote web site is blocked.

    If you want to block HTTPS traffic as well, duplicate those two commands and replace "80" with "443".
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Dec 2012
    Beans
    2

    Re: Ubuntu PPTPD / PPTP Support - How can I block all sites except one on my VPN?

    Thanks!!, but what about if I wanted to allow only access to netflix.com could i put netflix.com or do i have to specify an ip address?

  4. #4
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Ubuntu PPTPD / PPTP Support - How can I block all sites except one on my VPN?

    If the rules are installed before the network starts, then you must use IP addresses because DNS resolution will not be available. Large sites like Netflix pose more complicated problems because they typically have multiple hosts that all share a single name. Connect to the Internet and run the command "host www.netflix.com". I see about eight different hosts that respond to that name. So you would need to write a rule for each of those IP addresses.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •