Community discussions

MikroTik App
 
akram
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Aug 10, 2005 4:58 pm

help

Mon Mar 22, 2010 6:29 pm

SLAN : it;s my lan - ip address : 192.168.1.2/24
SWAN : 1st internet line : 1.1.1.1
SABWAN : 2nd internet line : 2.2.2.2
i have 2 internet lines

i want to all to have internet on 1st line - this works fine

but this one not working - only 1 IP address will take the 2nd internet line with srt and dst for certian public ip address
i made the mangle on this ip address : 192.168.1.1
and i make in ip route
dst- address=0.0.0.0 gateway=1.1.1.1 routing_mark=LINE1
dst- address=0.0.0.0 gateway=2.2.2.2 routing_mark=LINE2

Ip firewall :

chain=srcnat outinterface=SWAN action masqurade
chain=srcnat outinterface=SABWAN scr_address=192.168.1.1 action=src_nat to_address=1.1.1.4
chain=dstnat in_interface=SABWAN scr_address=1.1.1.4 action=src_nat to_address=192.168.1.1


help me plz
 
perezcurda
just joined
Posts: 23
Joined: Wed Dec 24, 2008 10:10 pm

Re: help

Tue Mar 23, 2010 5:55 pm

HI,

First, if you want use routing-mark you need to create IP Firewal mangle action mark-connection to mark the connection that yo want to use one or another wan link.

I think that this link can be usefull

http://wiki.mikrotik.com/wiki/Load_Bala ... e_Gateways
 
akram
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Wed Aug 10, 2005 4:58 pm

Re: help

Sat Mar 27, 2010 1:59 am

i did that and it's working
now the problem i cannot access this ip from outside
i put src-nat and dst-nat
and it's not working
when i stop the ip route for this ip address i can access the server from outside
what can i do?
 
User avatar
kameelperdza
Member
Member
Posts: 468
Joined: Thu Nov 27, 2008 11:45 am
Location: Oudtshoorn, South Africa

Re: help

Sun Mar 28, 2010 8:52 pm

Hi you must have all of these otherwise it wont work.

/ip firewall mangle add src-address=1.1.1.0/24 routing-mark=LINE1 action=mark-routing new-routing-mark=LINE1
/ip firewall mangle add src-address=2.2.2.0/24 routing-mark=LINE2 action=mark-routing new-routing-mark=LINE1

/ip route add dst-address=0.0.0.0/0 gateway=1.1.1.1 routing-mark=LINE1
/ip route add dst-address=0.0.0.0/0 gateway=2.2.2.2 routing-mark=LINE2

/ip route rule add src-address=1.1.1.4 routing-mark=LINE1 table=LINE1 action=lookup
/ip route rule add src-address=1.1.1.5 routing-mark=LINE2 table=LINE2 action=lookup

Another thing you can try is to put gateways on different interfaces with different ip addresses.

I can remember that i tried made a bridge and put wan and lan in there and internet did not work

Who is online

Users browsing this forum: infabo, jh1, pe1chl and 69 guests