Questions tagged [iptables]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1
votes
0answers
24 views

How to block all udp Port accept only one port

Sir, I am trying to Block all udp Port accept only one Port on my rooted Android with iptables command,but I am getting error.. I am using this commands:- echo 1 65535 > /proc/sys/net/ipv4/...
3
votes
2answers
287 views

How to run .sh script (iptables commands) on start up

I am using LineageOS 18.1 When I was on LOS 16, I used to edit the file /system/etc/init.d/00banner and put my iptables commands there, e.g.: #!/system/bin/sh sh -c 'iptables -A OUTPUT -m owner --uid-...
1
vote
0answers
54 views

iptables-restore not working after iptables-save

I am trying the below with iptables-save > test.rules i am saving the saved rules file then with command iptables-restore test.rules, i am trying to restore the rules On iptables-restore, seeing ...
0
votes
0answers
47 views

External access to IP camera on Android Hotspot

I have an unlimited plan for mobile data and an android device with root enabled, used as hotspot. I'm able to connect ip camera in the local net, but I'm trouble to configure it for an external ...
0
votes
0answers
49 views

Custom device with ETH and WLAN running Android 7

I'm new to Android. I have a custom board with a Ethernet and Wireless connection (eth0 and wlan0). Wireless is connected to the internet and ethernet is acting as a DHCP server handing out ...
0
votes
0answers
54 views

What commands should I use to block three different ranges of ports, or to block all ports except two?

I'm new to iptables and I want to block some ports. I'm using a rooted Android phone. What commands are used to block three different ranges of ports or block all ports except two? I don't want to ...
1
vote
1answer
696 views

Android: how to find application locking xtables?

I have Pixel Experience (Android 10) installed on my Redmi K20. + Magisk 21.4. In terminal I enter command iptables -t mangle -L -n | grep TTL which throws Another app is currently holding the xtables ...
1
vote
1answer
347 views

Android cannot forward packets

Target: Perform IP forwarding for devices within the same local network. (The real target is transparent proxy but the IP forwarding is a prerequisite) Network setup: All devices are in the same local ...
0
votes
0answers
27 views

Is it possible to change the userID of something like Fused Location Provider?

I have a bunch of apps bundled under userID on my stock rom, including Fused Location Provider. Since I'm using AFWall+ to block said userID to block said apps - it also breaks my location detection ...
2
votes
0answers
97 views

How can I bypass android 9 VPN with iptables?

I'm targeting specific app with UID rule -m owner --uid-owner 1337 and I want this app always bypass VPN and use direct Wi-fi/Mobile Data connection. Ideally, I also want it to be universal, if ...
3
votes
1answer
8k views

How to send all internet traffic to a SOCKS5 proxy server in local network?

I got the inspiration here. It looks like AFWall+ is able to create a NAT forwarding policy to keep all traffic going through a SOCKS5 proxy and fool Google apps into thinking they are not connected ...
0
votes
0answers
695 views

AFWall+ not blocking consistently

I'm running a rooted pixel 3 (Magisk) with the "liboemcrypt disabler" module for running Netflix, Magisk Hide and the dg.db edit to disable attestation for running Google Pay. The firewall will work ...
2
votes
1answer
853 views

Restricting an app to only send internet traffic but not receive that back?

Is there a way or app to restrict some apps on my Android, or the whole device, to only send internet data packets but not receive them back? I want to confuse a game app by doing this. It restricts ...
1
vote
0answers
154 views

Cannot connect to Wifi iptables error

Lately my Google Pixel 2 will not connect to my Homewifi. It tries to connect all the time. Looking into the Log I get an iptables error: 05-06 10:03:56.253 1120-1355/? D/RecurrenceRule: Resolving ...
2
votes
1answer
1k views

Android DHCP Port Redirection

I am working on a MirrorLink implementation for the Google Pixel (Android 8.1.0). I must implement a DHCP server; however, Android applications cannot listen on reserved ports. The Android ...
1
vote
0answers
351 views

How to keep iptables changes on android after reboot?

If I do any changes to iptables on Android (my phone is running CyanogenMod 11 - Android 4.4.3), then these changes are lost after phone reboot. What should I do to keep them saved?
1
vote
0answers
743 views

Where should I place iptables update on Android at boot time?

I need to write specific values in the routing system using the iptables command for Android. The overall idea is that the user can navigate only using the provided DNS configuration. I've tried to ...
1
vote
0answers
420 views

Android VPN service's policy based routing relative to iptables (specific behavior question, android 5.0, 5.1)

Background: Several phones, different firmwares Elephone p7000, Android 5.0 based rom Xiaomi redmi note 2, three different roms (5.1 based Cyaonogen, 5.0 based AOSP derivative) Rooted. Installed a ...
1
vote
0answers
1k views

Configuring Android to IP FORWARDING

Android version : Lollipop. Rooted: Yes. I'm trying to connect a PC to a Laptop via a WLAN. I'm using my android as a WifiAdapter. I connected the android node to the WLAN. With a USB cable ...
1
vote
0answers
535 views

reverse tethering - offline for some applications

I try to get internet on my phone from my computer without instlling any tools. My configuration looks like : mybox -----(Ethernet)------[my computer]------(USB)-----[the phone] I enabled usb ...
2
votes
0answers
980 views

How to Reverse Usb Tethering with VPN [tun0 interface] routing?

I have a big problem and after many days I can't find any solution because I'm not Linux experienced user... Problem: I'm using USB [Reverse] Tether (Windows share internet with android phone via USB ...
1
vote
1answer
343 views

Forward tethered device?

Alright, so I have a raspberry pi (192.168.42.53 on rndis0) that is tethered to an android tablet to access the internet. The tablet is connected to my home LAN via WiFi (on wlan0). How do I forward ...
2
votes
1answer
6k views

How to enable Android Ip forwarding

In linux we can, # echo 1 > /proc/sys/net/ipv4/ip_forward or, # sysctl -w net.ipv4.ip_forward=1 There is no sysctl command nor /proc/sys/net/ipv4/ip_forward file in Android. Is there an ...
1
vote
2answers
2k views

App that survives a factory reset

My problem is theoretical at this moment. I am investigating if it is possible or not, before spending hours on it. I have a rooted phone. I want to add an entry to the IPTABLES on startup. If the ...
3
votes
1answer
12k views

How can I add iptables rules that persist across reboots?

I want to add an iptables rule on my Android phone. I used: iptables -t nat -A PREROUTING -p 6 -d 192.168.66.1 --dport 80 -j DNAT --to 192.168.66.1:808 ...as root. This rule can be checked in adb ...
2
votes
2answers
13k views

DNAT iptables rule on rooted Android phone?

How i can set iptables rule like this on my rooted Android phone: iptables -t nat -A PREROUTING -i wlan0 -s 192.168.1.100 -p tcp --dport 80 -j DNAT -–to-destination 192.168.1.101:8080 ... since ...
0
votes
1answer
420 views

How can I debug Droidwall blocking every app?

Starting some time ago, I have noticed that when Droidwall (1.5.7) is enabled, no apps can access wifi. Although the app is checked, it doesn't work, until I turn the firewall completely off. This ...