Tôi đã biên soạn Linux cho trình giả lập Android với chức năng netfilter đầy đủ được bật. Và có một nhị phân iptables sau khi xây dựng android từ nguồn.lỗi iptables trong android: iptables-save và iptables-restore không hoạt động
Khi tôi đẩy nhị phân này vào trình mô phỏng
tôi có thể thực hiện các lệnh như dưới đây thành công.
iptables -L
iptables -F
iptables -A INPUT -s www.google.com -j DROP
với lỗi này:
# # 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
#
và
# 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
nhưng ít nhất các lệnh trên họ làm việc!
nhưng khi tôi cố gắng
iptables-save or
iptables-restore
tôi nhận lỗi nói
iptables-save: not found
Trong tập tin cấu hình của tôi
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
vấn đề là gì .. ?? và làm thế nào tôi có thể kích hoạt chức năng iptables đầy đủ trong Android hoặc làm thế nào tôi có thể lưu các quy tắc iptables hoạt động hiện tại một cách an toàn và tải lại chúng khi khởi động lại tiếp theo.
vui lòng trợ giúp. cảm ơn bạn!
Tôi khá chắc chắn 'iptables-save' và' iptables-restore' là mã nhị phân khác nhau, do vậy tại sao họ không chứa khoảng trắng (như trái ngược với 'iptables -L', ví dụ, mà làm) . – eldarerathis
thực sự tôi muốn viết iptables-save hoặc iptables-retore như một câu. lấy làm tiếc. – Preetam