[SOLVED] AFWall+ iptables help


 
Thread Tools Search this Thread
Special Forums IP Networking [SOLVED] AFWall+ iptables help
# 8  
Old 02-27-2014
Go to a command line, and run that command.
# 9  
Old 02-27-2014
I downloaded the "Android Terminal Emulator" app. I typed in
PHP Code:
su 
and pressed enter. That made the superuser app pop up and I allowed it.

Then I typed in
Code:
modprobe config

and pressed enter. It then said, "modprobe: can't change directory to '2.6.35.7-perf-T680UVLG3-CL1165714' : No such fire or directory.

Then I typed in
PHP Code:
zcat /proc/config.gz awk '/CONFIG_NETFILTER_XT_MATCH_MAC/' 
and pressed enter. Then all it said was "CONFIG _NETFILTER_XT_MATCH_MAC=y"

I don't know what that means. And I also still have internet access.
# 10  
Old 02-27-2014
Well, your phone definitely supports mac filtering -- it's y, not no. And it doesn't need modprobe -- it's y, not m. So you shouldn't need to load anything special to get it to work. Which is very good since it's probably not feasible for you to change it... config.gz is a list of options that particular kernel was built with.

Please try the script I suggested (slightly changing to make it match the syntax your app seems to need )

Code:
$IPTABLES -A INPUT -m mac --mac-source 00:00:00:00:00:00 -j DROP
$IPTABLES -A FORWARD -m mac --mac-source 00:00:00:00:00:00 -j DROP

The FORWARD table may be necessary depending on how the phone uses its internet connection; packets might make it to the FORWARD chain instead of the INPUT chain first. It'd end up in INPUT eventually, but after it passes through FORWARD, it loses its MAC address.

I don't think REJECT makes sense in all contexts, and DROP definitely works on my systems.

Oh... Which MAC address are you putting in there? The router's, right?

Last edited by Corona688; 02-27-2014 at 02:18 PM..
# 11  
Old 02-27-2014
Ok, I put in the code that you said:

Code:
$IPTABLES -A INPUT -m mac --mac-source 00:00:00:00:00:00 -j DROP
$IPTABLES -A FORWARD -m mac --mac-source 00:00:00:00:00:00 -j DROP

Still not blocking internet access.

I was totally lost when you said this:
Quote:
it's y, not no. And it doesn't need modprobe -- it's y, not m.
Not sure if this has to do with anything, but I enabled logs in AFWall+, but when I go to look, it always says "Log is Empty," even if I browse around on the internet. It's always just empty.
# 12  
Old 02-27-2014
Quote:
Originally Posted by 3happypenguins
I was totally lost when you said this:
It'd make more sense if you've ever built your own kernel. You get a list of options to choose from, and get to pick whether device drivers are disabled (n), built-in(y), or put in modules to load later(m). /proc/config.gz is a list of what options were picked when the kernel was made.

The point is, this kernel has built-in support for mac filtering.

Does the AF+ documentation say to use $IPTABLES instead of iptables, or did you pick that up from an example somewhere? Try plain 'iptables'.

Quote:
Not sure if this has to do with anything, but I enabled logs in AFWall+, but when I go to look, it always says "Log is Empty," even if I browse around on the internet. It's always just empty.
I know nothing about AF+, so I couldn't say. iptables itself doesn't log unless told, but a firewall generator which talks to iptables could do who-knows-what.

My suggestion would be:

1) Turn off AF+
2) Type iptables -A INPUT -m mac --mac-source 00:00:00:00:00:00 -j DROP and iptables -A FORWARD -m mac --mac-source 00:00:00:00:00:00 -j DROP into a root console
3) See if that works

If that works, you might just be fighting your firewall generator.

P.S: There's probably not much reason to obscure your MAC address. That's not useful to anyone outside your local network.

Last edited by Corona688; 02-27-2014 at 02:37 PM..
# 13  
Old 02-27-2014
If I turned off AFWall+, I had no internet access. So I just uninstalled it. When you said "root console," I assume you mean the Android Terminal Emulator app? I opened that app, and typed in:

Code:
iptables -A INPUT -m mac --mac-source 00:00:00:00:00:00 -j DROP

and pressed enter. It just went to a new line. Didn't say or tell me anything. Then I typed in:

Code:
iptables -A FORWARD -m mac --mac-source 00:00:00:00:00:00 -j DROP

and pressed enter. Still didn't give me any message. Just a new line. Went to open another app... still had internet access. :/
# 14  
Old 02-27-2014
Depends on whether "android terminal emulator app" gives you a root console or not...

People who root their androids often install sshd, so they can ssh into an actual terminal without any "app" nonsense or uncertainty. Some of these terminal apps are half-pretend.

Which MAC address are you putting in? The router's, right?
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

[Solved] Tru64 vm

Hi, One of our old Digital Alpha Server has died (CPU Failure). I want to recover a file from that server. Backups were done via Networker, however, cross platform recovery is not supported and I don't have any other TRU64 server available. Is there a VM or Emulator available which can get... (1 Reply)
Discussion started by: Mack1982
1 Replies

2. Shell Programming and Scripting

[Solved] For loop help

Hello, This is really breaking my head. I request you help to solve this problem. I have a list of files at the source directory (/tmp) as below, NewTransfer_20131202_APAC.dat NewTransferFile_20131202_APAC.dat NewTransfer_20131203_APAC.dat NewTransferFile_20131203_APAC.dat... (3 Replies)
Discussion started by: sravicha
3 Replies

3. UNIX for Dummies Questions & Answers

[Solved] Not able to do a chroot.

Hi all, I have two doms on my machine. I boot my machine from an rfs in one dom1 and mount the other rfs in the other dom2 at /media. Now I wanted to restrict access of users on dom2 to only their home directories. I do not want them to access any other directories on dom1 or dom2. So I mounted... (2 Replies)
Discussion started by: sai2krishna
2 Replies

4. Shell Programming and Scripting

[Solved] Permutation

Hi, I am trying to permutate each column (Except for IDS). file.txt FID IID TOAST1 TOAST2 TOAST3 ID3 ID3 1 -9 2 ID4 ID4 2 1 1 ID1 ID1 -9 -9 1 ID8 ID8 1 1 -9 ID12 ID12 1 2 2 for toast1 column, there are two 1's, two 2's and one -9. Having the same number of denominations,... (2 Replies)
Discussion started by: johnkim0806
2 Replies

5. Shell Programming and Scripting

[Solved] How to use delimiter

Hi, I am using below script to get the below given output. But i am wondering how to pick the names from below output. Script: echo "dis ql(*) cluster(CT.CL.RIBRSBT3)"| runmqsc CT.QM.701t8|egrep QUEUE|sed -e 's/QUEUE(/ /'|sed -e 's/)/ /' Output: ... (10 Replies)
Discussion started by: darling
10 Replies

6. UNIX for Advanced & Expert Users

[SOLVED] No INPUT chain on nat table in iptables

Hello, I'm having problem with an iptables rule. It seems that on one of two systems on the nat table, the INPUT chain doesn't exist for some strange reason. I get the error below: # iptables -t nat -A INPUT -j ACCEPT iptables: No chain/target/match by that name. Here is my kernel on... (0 Replies)
Discussion started by: Narnie
0 Replies

7. Shell Programming and Scripting

[solved] merging two files and writing to another file- solved

i have two files as file1: 1 2 3 file2: a b c and the output should be: file3: 1~a 2~b 3~c (1 Reply)
Discussion started by: mlpathir
1 Replies

8. AIX

Problem Solved

Generally, most people, I guess, go from 5.3 ML4 Directly to TL 7. So they may never run into this issue. For the rest of us, here is the resolution of my problem in going from ML6 to TL7. Apparently with the change from ML to TL IBM added a "BuildDate Verification" routine into... (1 Reply)
Discussion started by: mrmurdock
1 Replies
Login or Register to Ask a Question