Hi,
I would like to connect 2nd isp (first is working at the time) to my Mikrotik Router (2.9.48).
I’m doing this in this way (ofc IP is assigned to ehternet card):
ip firewall mangle add chain=prerouting protocol=tcp dst-port=80 action=mark-routing new-routing-mark=GTSwww
ip route add gateway=xxx.xxx.xx.xx routing-mark=GTSwww
And I cannot force this rule
dst-address=0.0.0.0/0 routing-mark=GTSwww action=lookup table=GTSwww
There is no action and table “command”…and I’m reciving:
Invalid route configuration: No gateway
Could you help me ?
jwcn
October 27, 2007, 11:26pm
2
Where are you inputting:
dst-address=0.0.0.0/0 routing-mark=GTSwww action=lookup table=GTSwww
ip route add dst-address=0.0.0.0/0 routing-mark=GTSwww
and I cannot apply action and table…
MJ
jwcn
October 28, 2007, 3:21pm
4
ip route dst-address=0.0.0.0 gateway=xxx.xxx.xxx.xxx routing-mark=GTSwww
Hm… so it’s should look like this:
ip address add addres=xxx.xxx.xx.xx .....
ip firewall mangle mangle add chain=prerouting protocol=tcp dst-port=80 action=mark-routing new-routing-mark=markName
ip route add dst-address=0.0.0.0/0 gateway=xxx.xxx.xx.xx routing-mark=markName
After adding last entry www stop working
What is the reason?
jalokim
October 28, 2007, 11:28pm
6
jalokim:
What is the reason?
I think that I have found problem - but not the solution
After adding ip address i do not have access to it outside the network (even ping is not working). But what is funny - the same config works fine on other router (also on MT). I even switched network card - still this same situation. What da f… ?
MJ
janisk
October 29, 2007, 1:28pm
7
do you nat your network, is it set up correctly for both gateways (interfaces)
Janisk this was a good hint - i did not set nat for 2nd gw.
But, it is still not working.
Now my nat is like that:
chain=srcnat action=src-nat to-addresses=xxx.xx.xxx.xx to-ports=0-65535 out-interface=ext0 src-address=192.168.0.0/24 icmp-options=0:0
How should look nat for 2nd gw? Only routing-mark or with address class?
MJ
tgrand
November 6, 2007, 12:31pm
9
GW1:
/ip firewall nat add chain=srcnat out-interface=ext0 action=masquerade
GW2:
/ip firewall nat add chain=srcnat out-interface=ext1 action=masquerade
These are NAT rules.