Community discussions

 
NeODarK2
just joined
Topic Author
Posts: 7
Joined: Sat Feb 16, 2008 7:56 pm
Reputation: 0

Redirect http traffic to other ether interface

Sat Feb 16, 2008 8: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: 7423
Joined: Mon Jun 19, 2006 11:15 pm
Reputation: 25
First RouterOS version: 2.8
Location: Home Network Ltd., Minsk, Belarus
Contact:

Re: Redirect http traffic to other ether interface

Sun Feb 17, 2008 1:58 am

mangle - prerouting - port 80 - mark-routing = 'new_route'
route - add - 0.0.0.0/0, gw = <your ether2 gateway>, mark = 'new_route'
Russian-speaking forum: http://forum.mikrotik.by. Welcome :)

For every complex problem, there is a solution that is simple, neat, and wrong.

¡ɹǝ|SOɹǝʇnoɹ ʞıʇoɹʞıW ɯ‚|

MikroTik. Your life. Your routing.
 
NeODarK2
just joined
Topic Author
Posts: 7
Joined: Sat Feb 16, 2008 7:56 pm
Reputation: 0

Re: Redirect http traffic to other ether interface

Sun Feb 17, 2008 11: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: 7423
Joined: Mon Jun 19, 2006 11:15 pm
Reputation: 25
First RouterOS version: 2.8
Location: Home Network Ltd., Minsk, Belarus
Contact:

Re: Redirect http traffic to other ether interface

Sun Feb 17, 2008 6:37 pm

hmmm... post your firewall and routes config here
Russian-speaking forum: http://forum.mikrotik.by. Welcome :)

For every complex problem, there is a solution that is simple, neat, and wrong.

¡ɹǝ|SOɹǝʇnoɹ ʞıʇoɹʞıW ɯ‚|

MikroTik. Your life. Your routing.
 
miahac
Long time Member
Long time Member
Posts: 513
Joined: Wed Dec 14, 2005 6:04 pm
Reputation: 0
Location: Wichita, KS
Contact:

Re: Redirect http traffic to other ether interface

Sun Feb 17, 2008 9: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_Routing_in_RouterOS_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.
Network Administrator
Kansas Hosting and Wichita Data Centers
 
miahac
Long time Member
Long time Member
Posts: 513
Joined: Wed Dec 14, 2005 6:04 pm
Reputation: 0
Location: Wichita, KS
Contact:

Re: Redirect http traffic to other ether interface

Sun Feb 17, 2008 9: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
Network Administrator

Kansas Hosting and Wichita Data Centers
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1459
Joined: Wed May 18, 2005 5:57 pm
Reputation: 49
First RouterOS version: v2.8.14
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: Redirect http traffic to other ether interface

Mon Feb 18, 2008 11:10 am

I suggest to route DNS requests also trough that interface
With great knowledge comes great responsibility, because of ability to recognize i...incompetent people much faster.
 
NeODarK2
just joined
Topic Author
Posts: 7
Joined: Sat Feb 16, 2008 7:56 pm
Reputation: 0

Re: Redirect http traffic to other ether interface

Tue Feb 19, 2008 1:23 pm

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

Who is online

Users browsing this forum: No registered users and 28 guests