[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: VPN routing on Sid



Luis Finotti a écrit :
> 
> When I first started using the VPN service, I could not SSH to my
> desktop from outside the network anymore.  After a lot of googling, I
> found out a solution (https://forums.openvpn.net/topic7163-15.htm):
> I've added the following script to /etc/network/if-up.d:
> 
> --------------
> !/bin/bash
> 
> ip rule add from 192.168.29.120 table 10
> ip route add default via 192.168.29.1 table 10
> ----------------
> 
> where 192.168.29.120 is the IP of the desktop and 192.168.29.1 is the
> IP of the router.
> 
> recently, when I run the script above (as I've been doing for a
> while), I can still connect from *outside* my network, but *not* from
> inside (i.e., other computers connected to the same router).  From
> within the network, nothing works (SSH, Samba, minidlna...).

Apparently your router is doing a bad job, not forwarding packets from
LAN to LAN. Anyway, it is better to add an exception to the default
route for the LAN subnet in table 10 to make the routing direct :

ip route add 192.168.29.0/24 dev eth0 table 10

(If required, replace "eth0" with whatever the LAN interface is.)


Reply to: