Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

VPN Connection only for some Target Addresses

Hi,

I've kind of a special requirement:
I've an Internet connection with a govermental firewall and so I have a VPN Connection, to allow access to some needed blocked websites.
But the traffic through the VPN is slower so I want to route the traffic depending on a configurable list of IPs/Hostnames. 
But now after establishing the SSL-VPN with Sophos all the traffic is routet through this VPN. I couldn't find a configuration menu to change this. Is there a way directly with Sophos to handle this or how can you run this setup with sophos?

thanks,
linuxadmin


This thread was automatically locked due to age.
Parents
  • Hi,

    I attached the SSL Configuration with pictures (the apc config file is nothing special, very basic, but because of security reasons I cannot post it...)
    and the routing table after establishing the connection.
    My only NAT rule is: iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE

    Routing Table after the SSL VPN is connected:

    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         10.8.0.9        128.0.0.0       UG    0      0        0 tun0
    10.8.0.1        10.8.0.9        255.255.255.255 UGH   0      0        0 tun0
    10.8.0.9        0.0.0.0         255.255.255.255 UH    0      0        0 tun0
    127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
    128.0.0.0       10.8.0.9        128.0.0.0       UG    0      0        0 tun0
    192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
    192.168.1.0     192.168.0.2     255.255.255.0   UG    5      0        0 eth1
    192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth2
    192.168.99.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
    199.x.x.x 192.168.2.4     255.255.255.255 UGH   0      0        0 eth2


    with these routes, local traffic directly attached to the server is working, but everything routet is going through tun0. Networks attached to eth2 through local routers cannot be reached with these routing settings.

    eth1 - 192.168.0.1 / 24 local network
    eth2 - 192.168.2.1 / 24 ldevice to internet router 192.168.2.4
    tun0 - vpn to vpn server 199.x.x.x

    What I did is deleting the route 128.0.0.0 netmask 128.0.0.0, and added to ip route tables for internet traffic through tun0 and through eth2. But I only managed to choose the ip route tables with the iptables mark feature. that works, but I don't want to add manually firewall scripts etc and prefer to do anything with the gui.


    ip route add default dev tun0 table net_vpn1
    ip rule add fwmark 0x1 table net_vpn1

    iptables -A OUTPUT -t mangle -d www.heise.de -j MARK --set-mark 1
    iptables -t nat -A PREROUTING -t mangle -d www.heise.de -j MARK --set-mark 1
    ...


    hope it gets clearer... [:)]
    linuxadmin
Reply
  • Hi,

    I attached the SSL Configuration with pictures (the apc config file is nothing special, very basic, but because of security reasons I cannot post it...)
    and the routing table after establishing the connection.
    My only NAT rule is: iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE

    Routing Table after the SSL VPN is connected:

    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         10.8.0.9        128.0.0.0       UG    0      0        0 tun0
    10.8.0.1        10.8.0.9        255.255.255.255 UGH   0      0        0 tun0
    10.8.0.9        0.0.0.0         255.255.255.255 UH    0      0        0 tun0
    127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
    128.0.0.0       10.8.0.9        128.0.0.0       UG    0      0        0 tun0
    192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
    192.168.1.0     192.168.0.2     255.255.255.0   UG    5      0        0 eth1
    192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth2
    192.168.99.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
    199.x.x.x 192.168.2.4     255.255.255.255 UGH   0      0        0 eth2


    with these routes, local traffic directly attached to the server is working, but everything routet is going through tun0. Networks attached to eth2 through local routers cannot be reached with these routing settings.

    eth1 - 192.168.0.1 / 24 local network
    eth2 - 192.168.2.1 / 24 ldevice to internet router 192.168.2.4
    tun0 - vpn to vpn server 199.x.x.x

    What I did is deleting the route 128.0.0.0 netmask 128.0.0.0, and added to ip route tables for internet traffic through tun0 and through eth2. But I only managed to choose the ip route tables with the iptables mark feature. that works, but I don't want to add manually firewall scripts etc and prefer to do anything with the gui.


    ip route add default dev tun0 table net_vpn1
    ip rule add fwmark 0x1 table net_vpn1

    iptables -A OUTPUT -t mangle -d www.heise.de -j MARK --set-mark 1
    iptables -t nat -A PREROUTING -t mangle -d www.heise.de -j MARK --set-mark 1
    ...


    hope it gets clearer... [:)]
    linuxadmin
Children
No Data