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

Ubuntu Static Route

Discussion in 'Linux & Open Source' started by miller745, Jan 4, 2020.

  1. miller745

    Hitman

    Joined: Oct 17, 2002

    Posts: 564

    Location: Darlington

    Hello folks,
    I'm having a mess about with linux, found that when VPN is active I can't ssh or remote in to the box over the network (it's headless)
    A mate said I need a static route, but have no idea where to start. Does this look correct?
    [​IMG]

    Linux box is 192.168.0.64 (DNS is localhost due to PiHole running, would this work?)
    PC which will be remoting into linux is 192.168.0.65
    Router is 192.168.0.1
    End goal is the VPN to be running, the linux box has connection to the internet and also I can remote in locally if this is possible. At the minute I can't even ssh in to stop the vpn service.

    Thanks for any help, very confused!
     
  2. Rainmaker

    Sgarrista

    Joined: Aug 18, 2007

    Posts: 8,283

    Location: Liverpool

    Code:
    sudo ip route add 192.168.0.0/24 via 192.168.0.1
    Job jobbed. You don’t say what the VPN is, but for most you can add the string as a PostUp command in its config. Check the VPN isn’t setting firewall rules blocking the local network also.
     
  3. miller745

    Hitman

    Joined: Oct 17, 2002

    Posts: 564

    Location: Darlington

    Will give it a shot thanks!