Gost is a networking module which allows you to treat it as many things including a transparent proxy. It also allows for proxy chaining.
On their page regarding transparent proxies you can see that there is a way to write iptables rules such that udp traffic is forwarded to the transparent proxy.
However their iptables rules seem to incorporate tproxy and this is where my issue occurs. What I'm trying to achieve is that I want all udp traffic forwarded to gost - not just traffic specific to a particular port. However on their iptables rules they seem to specify a rule using tproxy in which packets are marked only when sent to a particular port number.
I guess my question is there any way to accomplish what I'm trying to do? That is, forward all udp traffic to the gost transparent proxy using iptables?
For those of you who do not want to visit the links here is what the iptables rules are that were written out on the gost website:
iptables -t mangle -N GOST iptables -t mangle -N GOST_LOCAL iptables -t mangle -A GOST -d 255.255.255.255/32 -j RETURN iptables -t mangle -A GOST -d 127.0.0.0/8 -p udp -j RETURN iptables -t mangle -A GOST -d 192.168.0.0/16 -p udp -j RETURN iptables -t mangle -A GOST -p udp -j TPROXY --on-port 12345 --on-ip 0.0.0.0 --tproxy-mark 1 iptables -t mangle -A GOST_LOCAL -d 255.255.255.255/32 -j RETURN iptables -t mangle -A GOST_LOCAL -d 192.168.0.0/16 -p udp -j RETURN iptables -t mangle -A GOST_LOCAL -d 22.214.171.124/32 -p udp -j RETURN iptables -t mangle -A GOST_LOCAL -p udp -j MARK --set-mark 1 iptables -t mangle -A PREROUTING -j GOST iptables -t mangle -A OUTPUT -j GOST_LOCAL
Then they seem to have some rule regarding a routing table. I'm not sure what that is but I will include it just to make sure that I'm thorough.
ip rule add fwmark 1 table 100 ip route add local 0.0.0.0/0 dev lo table 100