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

VPN - portforwarding

Discussion in 'Tomato Firmware' started by dvbguy, Sep 22, 2013.

  1. dvbguy

    dvbguy Reformed Router Member

    Hi,

    I am running Tomato and using VPN service from Acevpn. It works fine

    Now I have the problem, that I need to be able to connect to a camera from the outside to the inside of my local network.
    I have tried to setup port forwarding, and it works fine if I disable the VPN. But of course would like to have vpn running all the time. According to acevpn they have blocked all ports, so I must run the forwarding true my own ISP wan ip adress.

    Can someone help regarding of that setup and how it should be?
     
  2. dvbguy

    dvbguy Reformed Router Member

    Anyone?
     
  3. dvbguy

    dvbguy Reformed Router Member

  4. scoobynz

    scoobynz Serious Server Member

    I forward ports via my vpn routeup script with the command;

    iptables -t nat -A PREROUTING -p tcp --dport 56969 -j DNAT --to 192.168.2.21:56969

    i.e. this forwards port 56969 to the ip 192.168.2.21

    Hope this helps.
     
  5. dvbguy

    dvbguy Reformed Router Member

    Great thank you for that :)

    Would it be possible to route all traffic from an internal IP adress direct to the internet, without going through the VPN ?,
     
  6. dvbguy

    dvbguy Reformed Router Member

    It did not help, when using vpn I am still not able to connect to my device :(
     
  7. scoobynz

    scoobynz Serious Server Member

  8. hans hansen

    hans hansen Reformed Router Member

    I tried to add the following in the "Wan Up" script

    # All traffic from a particular computer on the LAN will use the VPN
    iptables -t mangle -A PREROUTING -i br0 -m iprange --src-range 192.168.1.2 -j MARK --set-mark 0


    But even other devices on my network are still connected to vpn if I check the wanIP adress. Must something else be added?
     
  9. dvbguy

    dvbguy Reformed Router Member

    I tried to setup the following in my wan script.

    # All traffic from a particular computer on the LAN will use the VPN
    iptables -t mangle -A PREROUTING -i br0 -m iprange --src-range 192.168.1.2 -j MARK --set-mark 0

    But other devices on the network still got vpn access- not only this adress. Must something be added?
     
  10. scoobynz

    scoobynz Serious Server Member

Share This Page