Here is what I have:
Code: Select all
[admin@MikroTik] > ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 192.168.1.1/24 192.168.1.0 bridge1
1 D 10.107.6.210/22 10.107.4.0 ether5
2 D 92.242.79.188/32 92.242.92.245 l2tp-out1
3 D 192.168.180.220/32 192.168.180.52 pptp-out1
4 D 109.184.244.162/32 109.184.128.1 pppoe-out1
l2tp-out1 is my second WAN, and I only want a few things to go out to it.
Here is how my routing table looks like:
Code: Select all
[admin@MikroTik] > ip route print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADS 0.0.0.0/0 109.184.128.1 1
1 ADS 10.0.0.0/8 10.107.4.1 0
2 ADC 10.107.4.0/22 10.107.6.210 ether5 0
3 A S 69.4.236.0/24 l2tp-out1 1
4 A S 80.75.132.0/24 l2tp-out1 1
5 ADC 92.242.92.245/32 92.242.79.188 l2tp-out1 0
6 ADC 109.184.128.1/32 109.184.244.162 pppoe-out1 0
7 ADC 192.168.1.0/24 192.168.1.1 bridge1 0
traffic is NATed on way out:
Code: Select all
[admin@MikroTik] > ip firewall nat print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=srcnat action=masquerade out-interface=pppoe-out1
1 chain=srcnat action=masquerade out-interface=ether5
2 chain=srcnat action=masquerade out-interface=l2tp-out1
my SIP device is sending requests from LAN to both 69.4.236.0 and 80.75.132.0 nets, and I see packets going out through l2tp which is fine. However, packets destined to 69.x.x.x have source IP of pppoe connection, and packets going out to 80.x.x.x have correct source IP of l2tp connection! I have verified this multiple times with sniffer.
I admit I might be overlooking something, but damn! I don't see a reason for different behavior on different routing entries.
So, the question is whether any of you guys have any clues on what is going on here?
Any input that can shed some light will be very appreciated.
just in case, I have already played with preferred source and src-nat instead of masquerade,
and these have no impact on the result at all.
I'm using 6rc11 on rb2011.