Re: How to masquerade when using ROUTE

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

 



Hi,

Glaucius Djalma Pereira Junior wrote:
1) create an entry in /etc/iproute2/rt_tables

echo "200 fabian

I named it mail.out.

# echo "200	mail.out" >>/etc/iproute2/rt_tables

2) create the route default to route fabian
ip route add default via x.x.x.x dev ethX table fabian

I think you meant ppp1 instead of ethX?

# ip route add default via 217.5.98.57 dev eth0 table mail.out
RTNETLINK answers: Network is unreachable
# ip route add default via 217.5.98.57 dev ppp1 table mail.out
#

217.5.98.57 is my default gateway on ppp1.

# route
[...]
217.5.98.57     *           255.255.255.255 UH    0      0        0 ppp1
[...]

ip rule add from fwmark 3 lookup fabian prio 1

I had to remove the string "from". Then I could apply it without any error messages.

I did the other steps as you said. But tcpdump on ppp1 shows no traffic
and in syslog the following message appears:

May  8 17:55:20 eis kernel: MASQUERADE: Route sent us somewhere else.

Regards,
Fabian




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux