{"action":"created","issue":{"url":"https://api.github.com/repos/ukanth/afwall/issues/401","labels_url":"https://api.github.com/repos/ukanth/afwall/issues/401/labels{/name}","comments_url":"https://api.github.com/repos/ukanth/afwall/issues/401/comments","events_url":"https://api.github.com/repos/ukanth/afwall/issues/401/events","html_url":"https://github.com/ukanth/afwall/issues/401","id":99268703,"number":401,"title":"Is there a way to apply rule only on certain SSID?","user":{"login":"DavydLiu","id":1558201,"avatar_url":"https://avatars.githubusercontent.com/u/1558201?v=3","gravatar_id":"","url":"https://api.github.com/users/DavydLiu","html_url":"https://github.com/DavydLiu","followers_url":"https://api.github.com/users/DavydLiu/followers","following_url":"https://api.github.com/users/DavydLiu/following{/other_user}","gists_url":"https://api.github.com/users/DavydLiu/gists{/gist_id}","starred_url":"https://api.github.com/users/DavydLiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavydLiu/subscriptions","organizations_url":"https://api.github.com/users/DavydLiu/orgs","repos_url":"https://api.github.com/users/DavydLiu/repos","events_url":"https://api.github.com/users/DavydLiu/events{/privacy}","received_events_url":"https://api.github.com/users/DavydLiu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-05T18:32:16Z","updated_at":"2015-08-05T19:47:09Z","closed_at":null,"body":"For example, I want to apple rule for certain public WiFi but not to my home WiFi. Is there a way to achieve this? "},"comment":{"url":"https://api.github.com/repos/ukanth/afwall/issues/comments/128127267","html_url":"https://github.com/ukanth/afwall/issues/401#issuecomment-128127267","issue_url":"https://api.github.com/repos/ukanth/afwall/issues/401","id":128127267,"user":{"login":"CHEF-KOCH","id":727123,"avatar_url":"https://avatars.githubusercontent.com/u/727123?v=3","gravatar_id":"","url":"https://api.github.com/users/CHEF-KOCH","html_url":"https://github.com/CHEF-KOCH","followers_url":"https://api.github.com/users/CHEF-KOCH/followers","following_url":"https://api.github.com/users/CHEF-KOCH/following{/other_user}","gists_url":"https://api.github.com/users/CHEF-KOCH/gists{/gist_id}","starred_url":"https://api.github.com/users/CHEF-KOCH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CHEF-KOCH/subscriptions","organizations_url":"https://api.github.com/users/CHEF-KOCH/orgs","repos_url":"https://api.github.com/users/CHEF-KOCH/repos","events_url":"https://api.github.com/users/CHEF-KOCH/events{/privacy}","received_events_url":"https://api.github.com/users/CHEF-KOCH/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T19:47:09Z","updated_at":"2015-08-05T19:47:09Z","body":"This is not a right place for common talk about how to handle iptables and specific user problems, better use the XDA thread for such questions and read the official documents. \r\n\r\nBut to give some examples, of course it needs to be changed for needs:\r\n```\r\n# Needs NETFILTER_XT_MATCH_MAC in kernel alias zcat /proc/config.gz | awk '/CONFIG_NETFILTER_XT_MATCH_MAC/' (check against modprobe config)\r\n# Allow dns (port 53 for a specific mac) via mac to lan\r\niptables -t nat -A PREROUTING -i <interface-name> -m mac --mac-source <MAC_of_Android_device> -p udp --dport 53 -j DNAT --to <internal_LAN_DNS_IP>\r\n\r\n# Drop a mac (local traffic)\r\niptables -A INPUT -m mac --mac-source <MAC> -j DROP\r\n\r\n# Block routed traffic\r\niptables -A FORWARD -m mac --mac-source <MAC> -j DROP\r\n\r\n# Specific time from x between y\r\niptables -A INPUT -m time --timestart 04:30 --timestop 12:30 --weekdays Sun,Mon,Tue,Wed,Thu,Fri,Sat -j DROP\r\n```\r\n"}}