Created
August 11, 2019 19:54
-
-
Save troyunverdruss/fa06019bc22579ed75ebdd8b12b2d1bd 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
echo 8 custom > /etc/iproute2/rt_tables | |
ip rule add fwmark 8 table custom | |
ip route add default via globalip dev vlan2 | |
iptables -A OUTPUT -t mangle -o tun11 -p tcp --sport 2222 -j MARK --set-mark 8 | |
iptables -A PREROUTING -t mangle -s internalip/32 -p tcp --sport 22 -j MARK --set-mark 8 | |
iptables -A PREROUTING -t mangle -s internalip/32 -p udp --sport 1194 -j MARK --set-mark 8 | |
echo 0 > /proc/sys/net/ipv4/conf/vlan2/rp_filter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment