Community discussions

MikroTik App
 
NeODarK2
just joined
Topic Author
Posts: 7
Joined: Sat Feb 16, 2008 6:56 pm

Redirect http traffic to other ether interface

Sat Feb 16, 2008 7:02 pm

Hi, I have three interfaces, one is my LAN (ether3) and the others interfaces are ether1 and ether2 I have two connections to internet, and I want to make ether1 primary, for all traffic, and I want to mark http packets (port 80) and send it to the ether2, my idea is that if I put the emule, I can see web pages without lag. Some person can help me??? thanks.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Redirect http traffic to other ether interface

Sun Feb 17, 2008 12:58 am

mangle - prerouting - port 80 - mark-routing = 'new_route'
route - add - 0.0.0.0/0, gw = <your ether2 gateway>, mark = 'new_route'
 
NeODarK2
just joined
Topic Author
Posts: 7
Joined: Sat Feb 16, 2008 6:56 pm

Re: Redirect http traffic to other ether interface

Sun Feb 17, 2008 10:35 am

thanks for your reply my friend, but I make by this form, and only work a few minutes, later, I can´t see web pages, who´s the problem?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Redirect http traffic to other ether interface

Sun Feb 17, 2008 5:37 pm

hmmm... post your firewall and routes config here
 
miahac
Long time Member
Long time Member
Posts: 516
Joined: Wed Dec 14, 2005 5:04 pm
Location: Wichita, KS

Re: Redirect http traffic to other ether interface

Sun Feb 17, 2008 8:22 pm

sorry to hijack thread but I am perusing a similar goal maybe we can work together to solve both problems. I have RB 333 with wireless AP on WLAN1 and WLAN2 and Ether1. WLAN3 is public IP wireless bridge to a location T1 line. Clients connect with PPPoE and are assigned a public IP from the T1 IP range. Ether3 goes to a cable modem.

I am trying to dump http traffic to the cable modem. I have tried a simple policy route, http://wiki.mikrotik.com/wiki/Policy_Ro ... erOS_2.9.x but I think it does not work properly because the customers are not natted. I am wondering if the following is best?
/ip firewall mangle add chain=prerouting protocol=tcp dst-port=8080 action=mark-routing new-routing-mark=HTTP
passthrough=yes comment="" disabled=no

/ip route add gateway=x.x.x.x routing-mark=HTTP comment="HTTP Traffic" disabled=no
/ip route rule add src-address=0.0.0.0/0 table=HTTP action=lookup

/ip proxy
enabled: yes
src-address: 0.0.0.0
port: 8080
parent-proxy: 0.0.0.0:0
cache-drive: system
cache-administrator: "webmaster"
max-disk-cache-size: none
max-ram-cache-size: none
cache-only-on-disk: no
maximal-client-connections: 1000
maximal-server-connections: 1000
max-object-size: 512KiB
max-fresh-time: 3d

/ip firewall nat
chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080

/ip firewall filter
chain=input in-interface=ether3 src-address=0.0.0.0/0 protocol=tcp dst-port=8080 action=drop
edit -- One more thing. I do not care if http traffic reverses to public IP's the publics are for things like vpn, voip etc.
 
miahac
Long time Member
Long time Member
Posts: 516
Joined: Wed Dec 14, 2005 5:04 pm
Location: Wichita, KS

Re: Redirect http traffic to other ether interface

Sun Feb 17, 2008 8:48 pm

will adding a dstnat have any effect? like ..
/ip firewall mangle add chain=prerouting protocol=tcp dst-port=80 action=mark-routing new-routing-mark=HTTP
passthrough=yes comment="" disabled=no

/ip firewall nat
chain=dstnat protocol=tcp dst-port=80 action=passthrough 

/ip route add gateway=x.x.x.x routing-mark=HTTP comment="HTTP Traffic" disabled=no
/ip route rule add src-address=0.0.0.0/0 table=HTTP action=lookup
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1764
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: Redirect http traffic to other ether interface

Mon Feb 18, 2008 10:10 am

I suggest to route DNS requests also trough that interface
 
NeODarK2
just joined
Topic Author
Posts: 7
Joined: Sat Feb 16, 2008 6:56 pm

Re: Redirect http traffic to other ether interface

Tue Feb 19, 2008 12:23 pm

Thanks Chupaka now it´s work well, thanks again my friend

Who is online

Users browsing this forum: dido1236, flapviv, xristostsilis, xrlls and 82 guests