Comments (5)
what is your proxy software? what type is the proxy? this script require the proxy supports transparent proxy. have you tried redirecting all traffic to your proxy not just port 80?
from linux-router.
- using Charles Proxy
- SOCKS5 proxy type
- I dont see an option for transparent proxy under socks but I have enabled under regular proxy which runs on different port
- yes I have tried redirecting 80, 443 and even by process like
iptables -t nat -A OUTPUT -p tcp -m owner --uid-owner root -j REDSOCKS
and it works just not withAP
after many hours... I was able to get it working with sshuttle sshuttle -Nr root@SERVER_2_IP 0/0 -l 0.0.0.0
but this required another server with ssh and ** redsocks** with following rules
# Create new chain
iptables -t nat -N REDSOCKS
# Everything should be redirected to port 12345
iptables -t nat -A REDSOCKS -p tcp -j REDIRECT --to-ports 12345
# Any tcp connection made by `root' should be redirected.
iptables -t nat -A OUTPUT -p tcp -m owner --uid-owner root -j REDSOCKS
still would love your help to get it working without sshuttle
thank you
from linux-router.
As I remember, iptables doesn't support redirecting to SOCKS proxy. I have tried iptables -t nat -I OUTPUT -p tcp -j REDIRECT --to-ports xxxx
with different SOCKS proxy and failed.
yes I have tried redirecting 80, 443 and even by process like iptables -t nat -A OUTPUT -p tcp -m owner --uid-owner root -j REDSOCKS and it works
I guess your proxy does special treatment on web requests. Did you test ports and protocols other than web? If yes, maybe it really supports transparent proxy.
check these: Is the proxy listening on right interface ?(0.0.0.0
or 127.0.0.1
) Is firewall blocking input from AP?
Besides there's a program called tun2socks
which is useful if you want to combine iptables and SOCKS
It implements a TUN device which accepts all incoming TCP connections (regardless of destination IP), and forwards the connections through a SOCKS server.
from linux-router.
Also found these tools useful:
https://github.com/semigodking/redsocks
https://github.com/darkk/redsocks
https://github.com/vi/tcpsocks
from linux-router.
my setup is as following
iptables -> port 12345 (redsocks tcp port) -> 7771 (Charles proxy SOCK5 port)
so not going from iptables to socks directly, using redsocks to bridge the gap between.
I believe my issue is somewhere with iptables
rules.
from linux-router.
Related Issues (20)
- Bandwidth limitations? HOT 2
- Does not appear to function with easytether. HOT 1
- dnsmasq: cannot read dnsmasq.conf: Permission denied HOT 2
- hostapd error HOT 2
- How to make a permanent hotspot so when I close the terminal the hotspot stays on? HOT 2
- iw warning and error HOT 4
- How to set netmask?
- How can I get BSSID of the access point? HOT 1
- [Q] How to allow clients to communicate with eachother?
- Unable to connect to hotspot HOT 5
- nftables support HOT 3
- iw version 6.7 prints frequency differently HOT 4
- ./lnxrouter 以后还是不能用 HOT 1
- won't install HOT 1
- Should allow `brmfmac` driver without `--no-virt`
- Wifi 6E 6GHZ Support
- typo /etc/resolve.conf
- Integrate PIA into stack? HOT 1
- wifi hotspot doesn't work when VPN is connected HOT 11
- Error with setting up hotspot on Linux HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linux-router.