Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I will use these settings:

# Allow these TRUSTED hosts unrestricted access 
iptables -A wanout -i `nvram get lan_ifname` -m mac --mac-source <allowed MAC #1> -j ACCEPT 
iptables -A wanout -i `nvram get lan_ifname` -m mac --mac-source <allowed MAC #2> -j ACCEPT 

# Allow everyone access to these sites 
iptables -A wanout -i `nvram get lan_ifname` -d <VPN IP1> -j ACCEPT 
iptables -A wanout -i `nvram get lan_ifname` -d <VPN IP2> -j ACCEPT 

# Everything else gets blocked 
iptables -A wanout -i `nvram get lan_ifname` -j DROP

should this work fine? I'm assuming the vpn address are available on all ports. and everything else should be blacklisted on all ports.

This should prevent torrenting and any other activity unless done through a VPN unless the mac address is under the trusted list, correct?

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.