Program name: Ros force-opens the home page (similar to the China Telecom ADSL force-opens the specified home page)

Source: Internet
Author: User

# Program name: Ros force-opens the home page (similar to the China Telecom ADSL force-opens the specified home page)
# Program version: Test
# Program rating: None
# Installation instructions:
#1. This program is only debugged on ros2.9.27 and has not been tested in other versions;
#2. Back up data before installation. All consequences are irrelevant to kuwin;
#2. winbox-> system-> scripts-> Press +, paste the program content, press OK, and then press run script.
######################################## ######################################## ####
# Defining variables
# Server IP address of the Home Page
: Local strtoaddress
: Set strtoaddress 192.168.120.253

# Server port of the Home Page
: Local strtoport
: Set strtoport 80

# Time Limit 1: Jump to the specified homepage within the specified time limit, and set 1-5 seconds
: Local strtimeout1
: Set strtimeout1 2 S

# Time Limit 2: Do not jump to the specified homepage within the specified time limit. The value of 3 hours is 3 h. (The test can be set to 1 minute and 1 m)
: Local strtimeout2
: Set strtimeout2 3 H

IP firewall mangle add chain = prerouting protocol = tcp dst-Port = 80 Src-address-list =! Src2 \
Action = add-Src-to-address-list = src1 address-list-Timeout = $ strtimeout1 comment = timeout1

IP firewall mangle add chain = prerouting protocol = tcp dst-Port = 80 \
Action = add-Src-to-address-list = src2 address-list-Timeout = $ strtimeout2 comment = timeout2

IP firewall Nat add chain = dstnat protocol = tcp dst-Port = 80 Src-address-list = src1 \
Action = DST-nat to-addresses = $ strtoaddress to-ports = $ strtoport comment = toaddress
###### Program end ################################ ######################################

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.