upload a web page(with a nonpayment notice) to a web server, make a address list named= nonpaid user, add non paid user ip to that address list, then make dat nat rule with src-address= nonpaid user and dst-nat to your web server ip and port.
Thanks maybe it would be helpful to you.
upload a web page(with a nonpayment notice) to a web server, make a address list named= nonpaid user, add non paid user ip to that address list, then make dat nat rule with src-address= nonpaid user and dst-nat to your web server ip and port.
Thanks maybe it would be helpful to you.
good ideadisconnect it !
chain=dstnat action=dst-nat to-addresses=85.252.x.x to-ports=80 src-address=85.252.x.x dst-port=80 protocol=tcp comment="customer doesnt pay" disabled=noupload a web page(with a nonpayment notice) to a web server, make a address list named= nonpaid user, add non paid user ip to that address list, then make dat nat rule with src-address= nonpaid user and dst-nat to your web server ip and port.
Thanks maybe it would be helpful to you.
ok first of all 85.252.x.x is your web server IP right? then what is src-address=85.252.x.x ? src-address should be your client IP address whom you want to show your nonpayment notice. you can use only protocol=tcp don't use dst-port=80 cause then your this client can logon to yahoo messanger or service like that.fosben wrote:
chain=dstnat action=dst-nat to-addresses=85.252.x.x to-ports=80 src-address=85.252.x.x dst-port=80 protocol=tcp comment="customer doesnt pay" disabled=no
ok first of all 85.252.x.x is your web server IP right? then what is src-address=85.252.x.x ? src-address should be your client IP address whom you want to show your nonpayment notice. you can use only protocol=tcp don't use dst-port=80 cause then your this client can logon to yahoo messanger or service like that.fosben wrote:
chain=dstnat action=dst-nat to-addresses=85.252.x.x to-ports=80 src-address=85.252.x.x dst-port=80 protocol=tcp comment="customer doesnt pay" disabled=no
Thanks
yes, and as I said, this works to all but the web server I want it to work to.. So what I was asking is what could be wrong on the web server I natted to since it didnt workchain=dstnat action=dst-nat to-addresses=(web server ip) to-ports=80 src-address=(user IP) protocol=tcp comment="customer doesnt pay" disabled=no
x.x.x.x = IP address of your webserver that will give the "please pay us" page.
y.y.y.y = the IP address of a customer who has been suspended for nonpayment
/ ip firewall nat
add chain=dstnat action=dst-nat to-addresses=x.x.x.x to-ports=80 \
dst-port=80 protocol=tcp src-address-list=suspended_customers comment="" \
disabled=no
/ ip firewall filter
# You want to allow DNS, so they can lookup www.youtube.com (for example) and let their browser
# attempt to contact it but reject all other UDP traffic
add chain=forward action=reject reject-with=icmp-admin-prohibited dst-port=!53 \
protocol=udp src-address-list=suspended_customers comment="" disabled=no
# Once they've resolved www.youtube.com, you let their port 80 request get out (and to the NAT
# rules).
add chain=forward action=reject reject-with=icmp-admin-prohibited dst-port=!80 \
protocol=tcp src-address-list=suspended_customers="" disabled=no
/ ip firewall address-list
# And here is where we define the customer IPs that get their traffic filtered and redirected
add list=suspended_customers address=y.y.y.y comment="" disabled=no
This setting works great, but only if the server x.x.x.x is in front of mikrotik:Code: Select allx.x.x.x = IP address of your webserver that will give the "please pay us" page. y.y.y.y = the IP address of a customer who has been suspended for nonpayment
Note that these specific rules will allow non-tcp/udp traffic through. If you definitely need to block those, you can modify these rules.Code: Select all/ ip firewall nat add chain=dstnat action=dst-nat to-addresses=x.x.x.x to-ports=80 \ dst-port=80 protocol=tcp src-address-list=suspended_customers comment="" \ disabled=no / ip firewall filter # You want to allow DNS, so they can lookup www.youtube.com (for example) and let their browser # attempt to contact it but reject all other UDP traffic add chain=forward action=reject reject-with=icmp-admin-prohibited dst-port=!53 \ protocol=udp src-address-list=suspended_customers comment="" disabled=no # Once they've resolved www.youtube.com, you let their port 80 request get out (and to the NAT # rules). add chain=forward action=reject reject-with=icmp-admin-prohibited dst-port=!80 \ protocol=tcp src-address-list=suspended_customers="" disabled=no / ip firewall address-list # And here is where we define the customer IPs that get their traffic filtered and redirected add list=suspended_customers address=y.y.y.y comment="" disabled=no
I prefer rejecting, rather than dropping traffic, so the customer will immediately see that their connection attempt (IM's, ftp, file sharing, etc)
has failed, rather than waiting for a timeout.