Re: Need help creating proper routes / iptables for VPN
- From: Pascal Hambourg <boite-a-spam@xxxxxxxxxxxxxxx>
- Date: Wed, 05 Jan 2011 19:35:36 +0100
Moe Trin a écrit :
If you want to add a route to 192.168.10.2-200, you most likely want
it to be accessed through the host/router at 192.168.10.1, and this
can be done using the ppp routing scripts. Look in the directory
/etc/ppp/ and see if there is a file named /etc/ppp/ip-up (which
runs in a default ANU ppp setup when the ppp link goes up for IP
traffic). You can put a routing command in there to add the route
/sbin/route add -net 192.168.10.0 netmask 255.255.255.0 gw $5
Alternatively, you can specify the PPP interface instead of the gateway
/sbin/route add -net 192.168.10.0 netmask 255.255.255.0 dev $1
It won't make a difference in most cases, except in special situations
when multiple PPP connections (thus having the same remote address) with
the same peer are established, for load-balancing or fail-over.
Also, in case the system may establish different kinds of PPP
connections, it may be useful to identify each of them with the
'ipparam' pppd option, whose value is available in the variable $6.
NOTE that your un-named
distribution may have altered the ppp binary, and use slightly
different filenames, but this should be documented.
In some distributions such as Debian (and maybe derivatives), the
provided /etc/ppp/ip-up script runs scripts found in the directory
/etc/ppp/ip-up.d/ (with fancy PPP_* variable names, read the script for
details), so it is be better to create a script there than to modify the
provided script.
These scripts are a good location to add/remove iptables rules related
to the PPP connection too.
.
- Follow-Ups:
- Re: Need help creating proper routes / iptables for VPN
- From: Moe Trin
- Re: Need help creating proper routes / iptables for VPN
- References:
- Need help creating proper routes / iptables for VPN
- From: alumnizx
- Re: Need help creating proper routes / iptables for VPN
- From: Moe Trin
- Need help creating proper routes / iptables for VPN
- Prev by Date: Re: Need help creating proper routes / iptables for VPN
- Next by Date: Re: Need help creating proper routes / iptables for VPN
- Previous by thread: Re: Need help creating proper routes / iptables for VPN
- Next by thread: Re: Need help creating proper routes / iptables for VPN
- Index(es):
Relevant Pages
|