Closed willglynn closed 8 years ago
@willglynn Interesting, I must admit that I'm at best a journeyman with iptables
. Going to test this out to make sure it works then merge it.
@willglynn Looks like you'll have to rebase onto master.
Rebased.
This looks good, merging.
The README currently suggests intercepting traffic using
-j DNAT --to-destination $IP:$PORT
, but there's an alternative:This commit changes the README to suggest
-j REDIRECT --to-ports $PORT
instead. This saves the step of needing to find the interface IP (eliminating theip|grep|awk|cut|head
chain) which makes configuration simpler. Additionally,REDIRECT
is guaranteed to always send matching traffic to the local machine, even if the interface configuration changes.