Community discussions

MikroTik App
 
shadowteller
just joined
Topic Author
Posts: 20
Joined: Tue May 22, 2007 7:10 pm

Missing something...just not seeing it

Sat Jun 30, 2007 3:04 am

Okay the situation is that I have a normal setup with a strange outcome.

What I want to do is use MT routers as Hotspots. These hotspots will have two roles; one is a paid subscriber and the other is a free access paid for by advertisements. I want to use the trial user and HTTP-PAP/HTTPS authentication built into the MT OS.

So the advertisement system is external and works fine. It set on its own IP next to the gateway. When I setup the free trial user HS it works great and the advertisements off the proxy server do what they are supposed to do. I had to use skynoc's little firewall code.
/ip firewall nat add chain=dstnat protocol=tcp dst-port=80 action=dst-nat to-addresses=externalproxy to-ports=externalport
That worked excellent. The problem is how do I get it so that the authorized paid users don't go through the external proxy server?

As a note I have tried setting up two Hotspot profiles with different IP ranges, one range being the advertisement (10.5.50.x) range and one being the paid for range (10.5.100.x). This works fine except my paid users don't get automatically redirected to the HS Logon Page. Where my Free users do!!!

Thank you in advance!!
~prestN
 
shadowteller
just joined
Topic Author
Posts: 20
Joined: Tue May 22, 2007 7:10 pm

Re: Missing something...just not seeing it

Mon Jul 02, 2007 3:54 am

Bump....

Wow is this that tough?
 
sten
Forum Veteran
Forum Veteran
Posts: 919
Joined: Tue Jun 01, 2004 12:10 pm

Re: Missing something...just not seeing it

Mon Jul 02, 2007 5:01 pm

:shock:
that would be impossible since you unconditionally redirect all tcp port 80 traffic to the proxy.
*DuH*
 
shadowteller
just joined
Topic Author
Posts: 20
Joined: Tue May 22, 2007 7:10 pm

Re: Missing something...just not seeing it

Mon Jul 02, 2007 8:04 pm

Ouch the Duh was a bit harsh, but I understand that...what about conditionally sending only certain IP ranges on port 80 to the proxy server and everyone else gets to bypass it?
 
sten
Forum Veteran
Forum Veteran
Posts: 919
Joined: Tue Jun 01, 2004 12:10 pm

Re: Missing something...just not seeing it

Tue Jul 03, 2007 11:43 am

it was unduly harsh. i apologize.

try adding the IP adresses you want to bypass the proxy to an address-list called (e.g. bypass-list).
then change the redirection rule to:
/ip firewall nat add chain=dstnat protocol=tcp dst-port=80 src-address-list=!bypass-list action=dst-nat to-addresses=externalproxy to-ports=externalport
notice the
src-address-list=!bypass-list
essentially meaning NOT in "bypass-list".
 
shadowteller
just joined
Topic Author
Posts: 20
Joined: Tue May 22, 2007 7:10 pm

Re: Missing something...just not seeing it

Wed Jul 04, 2007 1:22 am

Was pretty much the ticket...I also created two pools to solve all this so that the src-address-list was always in the same range.
/ip firewall nat add chain=dstnat protocol=tcp dst-port=80 src-address-list=!bypass-list action=dst-nat to-addresses=externalproxy to-ports=externalport

Thank you very much this works like a charm.
 
epproach_lyle
Frequent Visitor
Frequent Visitor
Posts: 51
Joined: Tue Jul 10, 2007 1:13 am
Location: North Carolina, USA
Contact:

Re: Missing something...just not seeing it

Tue Jul 10, 2007 3:52 pm

Can I set 2 different pools in the same VLAN?

I am trying to accomplish the same thing... just on a VLAN basis.

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Javokhir, pturmel, sindy, sirbryan, tdw and 214 guests