SHARE
TWEET

Untitled

a guest Jun 25th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -A FORWARD -p udp -m udp --dport 9987 -d 192.168.168.2 -j ACCEPT
  2. -A FORWARD -p udp -m udp --sport 9987 -j ACCEPT
  3.  
  4. -A PREROUTING -d PUBLIC_IP_A/32 -p udp -m udp --dport 9987 -j DNAT --to-destination 192.168.168.2:9987
  5. -A POSTROUTING -s 192.168.168.0/30 ! -o gre+ -j SNAT --to-source PUBLIC_IP_A
  6.      
  7. ip rule add fwmark 65 table NOVPN
  8. ip route add default via 172.31.1.1 dev eth0 table NOVPN
  9. iptables -t mangle -A OUTPUT -p tcp --sport 22 -j MARK --set-mark 65
  10.      
  11. route -n
  12. Kernel IP routing table
  13. Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  14. 0.0.0.0         172.31.1.1      0.0.0.0         UG    0      0        0 eth0
  15. 172.31.1.1      0.0.0.0         255.255.255.255 UH    0      0        0 eth0
  16. 192.168.168.0   0.0.0.0         255.255.255.252 U     0      0        0 gre1
  17.      
  18. route -n
  19. Kernel IP routing table
  20. Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  21. 0.0.0.0         11.28.146.1     128.0.0.0       UG    0      0        0 tun0
  22. 0.0.0.0         172.31.1.1      0.0.0.0         UG    0      0        0 eth0
  23. 11.28.146.0     0.0.0.0         255.255.255.0   U     0      0        0 tun0
  24. 128.0.0.0       11.28.146.1     128.0.0.0       UG    0      0        0 tun0
  25. 172.31.1.1      0.0.0.0         255.255.255.255 UH    0      0        0 eth0
  26. 192.168.168.0   0.0.0.0         255.255.255.252 U     0      0        0 gre1
  27. VPN_IP          172.31.1.1      255.255.255.255 UGH   0      0        0 eth0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top