Netgear Nighthawk 7000 with DD-WRT, is selective (device/mac/IP) VPN use posible ?

hi all,

i have a Netgear running with PIA VPN, but at this moment al my trafic is going through the VPN.
i like to have a option to select with device,mac adres of IP (that dussent does not matter) is going through the PIA VPN and with is goint trough the normale provider IP.

does anyone know a solution for this?, a setting in the Netgear router i use with DD-WRT software.


Tnx
-C

Comments

  • edited February 2018
    Hi C,

    First set a static IP for the device you wish to exclude then perform the following

    Go to your Administration -> Commands tab in the DD-WRT config.
    In the Firewall section, click Edit and add the following :

    echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter  
    iptables -t mangle -F PREROUTING  
    ip route add default table 200 via $(nvram get wan_gateway)  
    ip rule add fwmark 1 table 200  
    ip route flush cache
    iptables -t mangle -I PREROUTING -i br0 -s <theip> -j MARK --set-mark 1
    change the <theip> to the ip that will excluded from the VPN Then click save to firewall within
    the Administration=> Commands section.

    Hope this helps!
  • PIAAnna said:
    Hi C,

    First set a static IP for the device you wish to exclude then perform the following

    Go to your Administration -> Commands tab in the DD-WRT config.
    In the Firewall section, click Edit and add the following :

    echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter  
    iptables -t mangle -F PREROUTING  
    ip route add default table 200 via $(nvram get wan_gateway)  
    ip rule add fwmark 1 table 200  
    ip route flush cache
    iptables -t mangle -I PREROUTING -i br0 -s <theip> -j MARK --set-mark 1
    change the <theip> to the ip that will excluded from the VPN Then click save to firewall within
    the Administration=> Commands section.

    Hope this helps!

    Hi Anna,

    Tnx for your update,  if i read i correct it for me like this,
    ----------------------
    echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter 
    iptables -t mangle -F PREROUTING 
    ip route add default table 200 via $(nvram get wan_gateway) 
    ip rule add fwmark 1 table 200 
    ip route flush cache
    iptables -t mangle -I PREROUTING -i br0 -s 192.168.2.25 -j MARK --set-mark 1
    ---------------------
    and now example internal IP is excluded for the PIA VPN ?

    also one new question,
    say i want to correct it again and example IP 192,168.2.25 must go trough thePIA VPN again.
    can i delete the "rule" again ?.

    Tnx
    -C


Sign In or Register to comment.