1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Forward specific port on machine over vpn

Discussion in 'Tomato Firmware' started by K34nut, May 18, 2017.

  1. K34nut

    K34nut New Member Member

    Hi all,

    My apologies if this has been answered before, I've been searching but I haven't managed to dig anything that i'm personally able to deduce up about this!

    Essentially what i'm trying to do is have it so a certain port (8181) on my server (192.168.1.50) is forwarded over a vpn. I'm fairly sure the code for this would be;

    iptables -t mangle -A PREROUTING -s 192.168.1.50 -p tcp --dport 8181 -j MARK --set-mark 311

    And to add it to /tmp/etc/openvpn/fw/vpnrouting311.sh, but whenever I add it and restart the VPN, it dissapears, which.. I somewhat expected.. But still!

    If anyone has any ideas how I could get this to work, that would be absolutely grand. Once again, apologies if this has already been asked before, i'm either blind or stupid, because I can't find it!

    Thanks in advance,
    Kind Regards,
    -Keanu
     

Share This Page