Created
October 17, 2017 22:18
-
-
Save ccampo133/755b45e966dc736f71137e049ed5f0c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables -t mangle -A PREROUTING -j ACCEPT -p tcp -m multiport --dports 80,443 -s ! 192.168.1.134 | |
iptables -t mangle -A PREROUTING -j MARK --set-mark 3 -p tcp -m multiport --dports 80,443 | |
ip rule add fwmark 3 table 2 | |
ip route add default via 192.168.1.139 dev br0 table 2 | |
# 192.168.1.134 is the source I want to redirect, 192.168.1.139 is the proxy, and iptables was run on the router (192.168.1.1). The proxy was listening on port 80. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment