• MikroTik.com
  • RouterBOARD
  • User Meeting
  • Training
  • User Manual
  • Support
  • Downloads
  • Videos
Register |   * Login | HOME

View unanswered posts | View active topics

Redirect http traffic to other ether interface  Page 1 of 1
 [ 8 posts ]  Post new topic Reply to topic
  Print view Previous topic | Next topic 
Author Message
NeODarK2
 Post subject: Redirect http traffic to other ether interface
PostPosted: Sat Feb 16, 2008 7:02 pm 
Offline
just joined

Joined: Sat Feb 16, 2008 6:56 pm
Posts: 7
Karma: 0
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.


Top
 Profile  
 
Chupaka
 Post subject: Re: Redirect http traffic to other ether interface
PostPosted: Sun Feb 17, 2008 12:58 am 
Offline
Forum Guru
Forum Guru
User avatar

Joined: Mon Jun 19, 2006 10:15 pm
Posts: 6906
Karma: 111

Location: Home Network Ltd., Minsk, Belarus
mangle - prerouting - port 80 - mark-routing = 'new_route'
route - add - 0.0.0.0/0, gw = <your ether2 gateway>, mark = 'new_route'

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

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

MikroTik. Your life. Your routing.

skype: pavel.skuratovich


Top
 Profile  
 
NeODarK2
 Post subject: Re: Redirect http traffic to other ether interface
PostPosted: Sun Feb 17, 2008 10:35 am 
Offline
just joined

Joined: Sat Feb 16, 2008 6:56 pm
Posts: 7
Karma: 0
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?


Top
 Profile  
 
Chupaka
 Post subject: Re: Redirect http traffic to other ether interface
PostPosted: Sun Feb 17, 2008 5:37 pm 
Offline
Forum Guru
Forum Guru
User avatar

Joined: Mon Jun 19, 2006 10:15 pm
Posts: 6906
Karma: 111

Location: Home Network Ltd., Minsk, Belarus
hmmm... post your firewall and routes config here

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

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

MikroTik. Your life. Your routing.

skype: pavel.skuratovich


Top
 Profile  
 
miahac
 Post subject: Re: Redirect http traffic to other ether interface
PostPosted: Sun Feb 17, 2008 8:22 pm 
Offline
Member
Member

Joined: Wed Dec 14, 2005 5:04 pm
Posts: 453
Karma: 0

Location: Wichita, KS
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?

Code:
/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


Top
 Profile  
 
miahac
 Post subject: Re: Redirect http traffic to other ether interface
PostPosted: Sun Feb 17, 2008 8:48 pm 
Offline
Member
Member

Joined: Wed Dec 14, 2005 5:04 pm
Posts: 453
Karma: 0

Location: Wichita, KS
will adding a dstnat have any effect? like ..

Code:
/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


Top
 Profile  
 
macgaiver
 Post subject: Re: Redirect http traffic to other ether interface
PostPosted: Mon Feb 18, 2008 10:10 am 
Offline
Forum Guru
Forum Guru
User avatar

Joined: Wed May 18, 2005 4:57 pm
Posts: 1016
Karma: 15

Location: Moscow
I suggest to route DNS requests also trough that interface

_________________
I know what i don't know, do you?


Top
 Profile  
 
NeODarK2
 Post subject: Re: Redirect http traffic to other ether interface
PostPosted: Tue Feb 19, 2008 12:23 pm 
Offline
just joined

Joined: Sat Feb 16, 2008 6:56 pm
Posts: 7
Karma: 0
Thanks Chupaka now it´s work well, thanks again my friend


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  Page 1 of 1
 [ 8 posts ] 

Board index » RouterOS » General

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Karma functions powered by Karma MOD © 2007, 2009 m157y