Revert "Add egress shielding with Makefile and systemd services"
This reverts commit 22c2a1fb8a.
This commit is contained in:
parent
22c2a1fb8a
commit
623be29fb0
6 changed files with 19 additions and 169 deletions
26
README.md
26
README.md
|
|
@ -256,16 +256,28 @@ Sandbox nodes route HTTP/HTTPS through tinyproxy, but raw TCP (SSH, etc.) goes o
|
|||
redsocks intercepts ALL outbound TCP and routes through the SOCKS proxy. No per-app configuration needed.
|
||||
|
||||
```bash
|
||||
# Quick setup
|
||||
make egress-shield
|
||||
# Install
|
||||
apt install redsocks
|
||||
git clone https://github.com/rofl0r/microsocks && cd microsocks && make
|
||||
|
||||
# Or step by step
|
||||
make microsocks # Build SOCKS5 proxy
|
||||
make redsocks-config # Generate /etc/redsocks.conf
|
||||
make egress-iptables # Set up iptables rules
|
||||
make egress-services # Install and start systemd services
|
||||
# Run microsocks (SOCKS5 proxy)
|
||||
./microsocks -p 1080
|
||||
|
||||
# Configure redsocks to use it
|
||||
cat > /etc/redsocks.conf <<EOF
|
||||
base { log_debug = off; log_info = off; daemon = on; }
|
||||
redsocks { local_ip = 127.0.0.1; local_port = 12345; ip = 127.0.0.1; port = 1080; type = socks5; }
|
||||
EOF
|
||||
|
||||
# iptables: redirect all outbound TCP (except to proxy itself)
|
||||
iptables -t nat -N REDSOCKS
|
||||
iptables -t nat -A REDSOCKS -d 127.0.0.0/8 -j RETURN
|
||||
iptables -t nat -A REDSOCKS -p tcp -j REDIRECT --to-ports 12345
|
||||
iptables -t nat -A OUTPUT -p tcp -j REDSOCKS
|
||||
```
|
||||
|
||||
Everything exits through one IP. Done.
|
||||
|
||||
**What's shielded:**
|
||||
- All egress IPs - HTTP, SSH, everything
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue