root@lmh3-1:~# systemctl stop ufw root@lmh3-1:~# echo "========== mangle ===========" iptables -t mangle -S echo "========== nat ===========" iptables -t nat -S echo "========== filter ===========" iptables -t filter -S ========== mangle =========== -P PREROUTING ACCEPT -P INPUT ACCEPT -P FORWARD ACCEPT -P OUTPUT ACCEPT -P POSTROUTING ACCEPT -N SSTP_OUTPUT -N SSTP_PREROUTING -N SSTP_RULE -A PREROUTING -j SSTP_PREROUTING -A OUTPUT -j SSTP_OUTPUT -A SSTP_OUTPUT -m addrtype --dst-type LOCAL -j RETURN -A SSTP_OUTPUT -m conntrack --ctdir REPLY -j RETURN -A SSTP_OUTPUT -m owner --gid-owner 13 -j RETURN -A SSTP_OUTPUT -p udp -m udp --dport 53 -m owner ! --gid-owner 1001 -j RETURN -A SSTP_OUTPUT -p udp -m conntrack --ctstate NEW,RELATED -j SSTP_RULE -A SSTP_OUTPUT -m connmark --mark 0x2333 -j MARK --set-xmark 0x2333/0xffffffff -A SSTP_PREROUTING -m addrtype --dst-type LOCAL -j RETURN -A SSTP_PREROUTING -m conntrack --ctdir REPLY -j RETURN -A SSTP_PREROUTING -p udp -m udp ! --dport 53 -m conntrack --ctstate NEW,RELATED -m addrtype ! --src-type LOCAL -j SSTP_RULE -A SSTP_PREROUTING -p udp -m connmark --mark 0x2333 -j TPROXY --on-port 188 --on-ip 127.0.0.1 --tproxy-mark 0x2333/0xffffffff -A SSTP_RULE -m set --match-set sstp_white dst -m set ! --match-set sstp_black dst -j RETURN -A SSTP_RULE -j CONNMARK --set-xmark 0x2333/0xffffffff ========== nat =========== -P PREROUTING ACCEPT -P INPUT ACCEPT -P OUTPUT ACCEPT -P POSTROUTING ACCEPT -N SSTP_OUTPUT -N SSTP_POSTROUTING -N SSTP_PREROUTING -N SSTP_RULE -A PREROUTING -j SSTP_PREROUTING -A OUTPUT -j SSTP_OUTPUT -A POSTROUTING -j SSTP_POSTROUTING -A SSTP_OUTPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m addrtype ! --dst-type LOCAL -m owner ! --gid-owner 13 -j SSTP_RULE -A SSTP_OUTPUT -p udp -m udp --dport 53 -m conntrack --ctstate NEW -m owner ! --gid-owner 13 -m owner ! --gid-owner 1001 -j REDIRECT --to-ports 60053 -A SSTP_POSTROUTING ! -s 127.0.0.1/32 -d 127.0.0.1/32 -j SNAT --to-source 127.0.0.1 -A SSTP_PREROUTING -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m addrtype ! --src-type LOCAL ! --dst-type LOCAL -j SSTP_RULE -A SSTP_PREROUTING -p udp -m udp --dport 53 -m conntrack --ctstate NEW -m addrtype ! --src-type LOCAL -j REDIRECT --to-ports 60053 -A SSTP_RULE -m set --match-set sstp_white dst -m set ! --match-set sstp_black dst -j RETURN -A SSTP_RULE -p tcp -j DNAT --to-destination 127.0.0.1:188 ========== filter =========== -P INPUT ACCEPT -P FORWARD ACCEPT -P OUTPUT ACCEPT -N ufw-after-forward -N ufw-after-input -N ufw-after-logging-forward -N ufw-after-logging-input -N ufw-after-logging-output -N ufw-after-output -N ufw-before-forward -N ufw-before-input -N ufw-before-logging-forward -N ufw-before-logging-input -N ufw-before-logging-output -N ufw-before-output -N ufw-reject-forward -N ufw-reject-input -N ufw-reject-output -N ufw-track-forward -N ufw-track-input -N ufw-track-output -A INPUT -j ufw-before-logging-input -A INPUT -j ufw-before-input -A INPUT -j ufw-after-input -A INPUT -j ufw-after-logging-input -A INPUT -j ufw-reject-input -A INPUT -j ufw-track-input -A FORWARD -j ufw-before-logging-forward -A FORWARD -j ufw-before-forward -A FORWARD -j ufw-after-forward -A FORWARD -j ufw-after-logging-forward -A FORWARD -j ufw-reject-forward -A FORWARD -j ufw-track-forward -A OUTPUT -j ufw-before-logging-output -A OUTPUT -j ufw-before-output -A OUTPUT -j ufw-after-output -A OUTPUT -j ufw-after-logging-output -A OUTPUT -j ufw-reject-output -A OUTPUT -j ufw-track-output