Content-type: text/html
ipsec eroute --add --src src/srcmaskbits|srcmask --dst dst/dstmaskbits|dstmask <SAID>
ipsec eroute --replace --src src/srcmaskbits|srcmask --dst dst/dstmaskbits|dstmask <SAID>
ipsec eroute --del --src src/srcmaskbits|srcmask --dst dst/dstmaskbits|dstmask
ipsec eroute --clear
ipsec eroute --help
ipsec eroute --version
Where <SAID> is --edst edst --spi spi --proto proto OR --said said OR --said %passthrough
A table entry consists of:
Addresses are written as IPv4 dotted quads, SPIs are '0x'-prefixed hexadecimal numbers and protocol is one of "ah", "esp" or "tun".
SAIDs are written as "proto0xSPI@address".
The format of /proc/net/ipsec_eroute is listed in ipsec_eroute(5).
ipsec eroute --add --src 192.168.0.1/32 \
--dst 192.168.2.0/24 --edst 192.168.0.2 \
--spi 0x135 --proto tun
sets up an eroute on a Security Gateway to protect traffic between the host 192.168.0.1 and the subnet 192.168.2.0 with 24 bits of subnet mask via Security Gateway 192.168.0.2 using the Security Association with address 192.168.0.2, Security Parameters Index 0x135 and protocol tun (50, IPPROTO_ESP).
ipsec eroute --replace --src company.com/24 \
--dst ftp.ngo.org/32 --said tun0x135@gw.ngo.org
replaces an eroute on a Security Gateway to protect traffic between the subnet company.com with 24 bits of subnet mask and the host ftp.ngo.org via Security Gateway gw.ngo.org using the Security Association with Security Association ID tun0x135@gw.ngo.org
ipsec eroute --del --src company.com/24 \
--dst www.ietf.org/32 --said %passthrough
deletes an eroute on a Security Gateway that allowed traffic between the subnet company.com with 24 bits of subnet mask and the host www.ietf.org to pass in the clear, unprocessed.