Re: How to select IP address for outgoing packets?
From: Alexander Clouter (alex_at_digriz.junk-this.org.uk)
Date: 04/28/05
- Next message: daytripper: "Re: netgear wgr614 v5: cannot connect to it"
- Previous message: Alexander Clouter: "Re: Remote acces to /dev/ttyS*"
- In reply to: Graham Murray: "How to select IP address for outgoing packets?"
- Next in thread: Alexander Clouter: "Re: How to select IP address for outgoing packets?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 28 Apr 2005 16:34:03 -0000
On 2005-04-28, Graham Murray <gmurray@webwayone.co.uk> wrote:
> [snipped]
>
> However I have been unable to force outgoing connections from the
> Linux system to use the IP address which I want. For most things this
> does not matter but I have the requirement to set up a VPN, which
> requires fixed endpoint addresses, from this system. I have tried
> setting the source address in the 'ip route' command, but this has no
> effect. I tried setting SNAT in the iptables 'nat' OUTPUT table, but
> SNAT is not valid in that table.
>
> [1] I know that this is not the best setup, but the ISP supplied the
> ADSL router and we do not have access to change its configuration.
>
Source based routing is what you are after.
http://lartc.org/howto/lartc.rpdb.html
You create a custom routing table for the VPN traffic and set its 'default
route' to use a particular source address.
In your system (main) routing table you have a route that simply tells the
kernel to use your custom table for 'vpn' traffic.
Have fun
Alex
- Next message: daytripper: "Re: netgear wgr614 v5: cannot connect to it"
- Previous message: Alexander Clouter: "Re: Remote acces to /dev/ttyS*"
- In reply to: Graham Murray: "How to select IP address for outgoing packets?"
- Next in thread: Alexander Clouter: "Re: How to select IP address for outgoing packets?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|