Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-04-2011, 12:24 PM
|
#1
|
LQ Newbie
Registered: Jan 2011
Posts: 28
Rep:
|
iptables error in android: iptables-save and iptables-restore not working
I have compiled Linux for android emulator with full netfilter functionality enabled. And got a iptables binary after building android from source.
When i push this binary to the emulator
i can execute commands like below successfully.
iptables -L
iptables -F
iptables -A INPUT -s www.google.com -j DROP
with this error:
# # iptables -L
getsockopt for multiport failed strangely: No such file or directory
getsockopt for multiport failed strangely: No such file or directory
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
#
and
# iptables -A INPUT -s www.google.com -j DROP
getsockopt for multiport failed strangely: No such file or directory
getsockopt for multiport failed strangely: No such file or directory
FIX ME! implement getgrnam() bionic/libc/bionic/stubs.c:344
but atleast the above commands they work!
but when i try
iptables-save or
iptables-restore
i get error saying
iptables-save: not found
In my config file
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
what is the problem..?? and how can i enable full iptables functionality in android or how can i save the current active iptables rules safely and reload them when next reboot.
please help. thank you!
|
|
|
04-08-2011, 09:03 AM
|
#2
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
4 days & no answers, I can move this to Linux - Networking, Linux - Wireless Networking, or Linux - Security if you think you'd get better exposure. Meanwhile, consider adding "Code:" blocks to your OP:
Quote:
Please put code, command line output, config files, etc. inside [CODE] tags, aka "Code:" blocks.
It will make your posts easier to read, & that will get you more, faster, better answers. -- Help us help you.
BTW, You can edit your post(s) to do this retroactively.
Thank you.
|
|
|
|
04-08-2011, 11:10 AM
|
#3
|
LQ Newbie
Registered: Jan 2011
Posts: 28
Original Poster
Rep:
|
Quote:
Originally Posted by archtoad6
4 days & no answers, I can move this to Linux - Networking, Linux - Wireless Networking, or Linux - Security if you think you'd get better exposure. Meanwhile, consider adding "Code:" blocks to your OP:
|
Actually i didn't know how to put code blocks. And regarding the question:
I think android team has modified iptables source, to exclude iptables-save than they must have modified some source files which call functions in iptables-save. May be because of that, the error comes
and also i checked iptables 1.3.7 sourcecode from netfilter. It seems that android source has its own modified iptables. Like, the file iptables-1.3.7/extension/libipt_connmark.c is changed to libipt_2connmark.c
I don't think this can be done, if also i want to i will have to modify the source again for android specific iptables...
Last edited by preetb123; 04-08-2011 at 11:12 AM.
|
|
|
04-09-2011, 08:06 AM
|
#4
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
Quote:
BTW, You can edit your post(s) to do this retroactively.
|
I really think you'd improve your chances of getting someone knows something about your question to take the time to read it thoroughly & reply. OTOH, it's your post, & your choice. Good luck.
|
|
|
04-09-2011, 10:13 AM
|
#5
|
LQ Newbie
Registered: Jan 2011
Posts: 28
Original Poster
Rep:
|
Quote:
Originally Posted by archtoad6
I really think you'd improve your chances of getting someone knows something about your question to take the time to read it thoroughly & reply. OTOH, it's your post, & your choice. Good luck.
|
Thank you very much! I'll do it from now.
|
|
|
04-11-2011, 01:56 PM
|
#6
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
Quote:
Originally Posted by preetb123
I'll do it from now.
|
I assume you mean "from now on"
That's good, thank you; but I was asking you to fix your 1st post in this thread:
http://www.linuxquestions.org/questi...6/#post4313606
|
|
|
All times are GMT -5. The time now is 09:50 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|