Magic Router (魔法路由器) is a routing software, routing Ip:Port to another or same computer. Fully control connection from 1 point to another point. Whatever TCP/IP protocol it is, if run under Windows Platform, you can control forward/reverse direction without difficulty.
If you have the following concern, here is the right place.
1. Distributed Denial of Service (DDoS)
2. Faster data transfer rate.
3. Convenient to start VPN simulated network.
4. Load balancing, auto switch.
5. Bandwidth control.
6. 1 port for multiple services.
7. Much lower software/hardware cost.
8. Quota Control, avoid data being stolen.
9. ActiveX for application client to make secure connection.
10. FTP Routing for Passive Mode FTP Server
There are 2 MASTER functions:
FORWARD ROUTING, plus firewall, quota, switch, qos, header forward.
REVERSE ROUTING, plus shell cmd on forwarder.
A. Standard IP:PORT routing.
. Bind selected adapter, i.e. select 127.0.0.1 to avoid other computer access.
. Allow free input and bind non local ip for listen.
. Auto switch IP:PORT to another IP:PORT
. QoS, control bandwidth of connection.
. Support TCP/UDP protocol, ie HTTP, SFTP, SMTP, POP3, DNS, TELNET, NETBIOS and SSL, Proxy, and more..
. Header forward, 1 port multiple usage, multiple service.
. HTTP Remote Management.
. Command line to start up Magic Router.
. Change on Send Buffer, Recv Buffer, Small Packet.
. User Access Time Setup.
. Intelligent Firewall with IPSEC System Service.
. Support Chinese GB/Big5 user interface.
. Packet Viewer, capture raw packet.
. DDOS Detection and Protection
. FTP Routing for Passive Mode FTP Server
B. Run as Alone, client, server mode
. AES Encryption, Compression, SSL3 and Authentication.
. Firewall for port, Black/White ip control, DNSBL, Quota Control.
C. Logging, Notification
. Auto Restart, txt to table conversion, add/remove black/white ip
. Data logging for protocol analysis.
. Shell Command on Forwarder/Remote Computer.
D. Powerful Reverse Connection:
. Agent Server, Listener Client, Forwarder Client.
. Shell command on forwarder, remote control.
. Simple file upload/download.
. Remote wake up computer.
. Bind Non Local Computer IP on Agent Listener.
. Auto Trigger Forwarder on Agent Server, run similarly as VPN Server.
. Support FTP protocol.
. Easier file sharing client (File Explorer) setup.
. Access rule on Agent Forwarder, Allowed ip, Blocked ip, Enabled Shell Cmd, Maximum connections.
E. Multiple Configuration
. Run as Windows Service.
. Free ActiveX Client for secure connection to server.
. Free Forwarder (Remote control computer).
. Supports Windows 2000/XP/Vista/Windows7/8/2008 32/64 bit.
F. Full version
.USD39 Home Edition will grant 39 installations on different computers.
.USD59 Prof Edition will grant 59 installations on different computers.
G. Trial version has 30 evaluation days.
. 60 minutes allowed run time for each start up.
. Increase memory usage and use up sockets.
. Limited features:
. No error control, no software crash control.
. Not allow to install as system service.
. Limit user to 10 in Agent Server / User Authentication.
. Disabled auto clear firewall record in database.
. Disabled reset black list ip lock.
. Disabled keep alive for agent listener and forwarder.
. Disabled Magic Router auto restart.
. Disabled user authentication in remote management.
H. Magic Router is a green program
. No need to install. You need to extract the program file, then run mr.exe will start up.
. Or run MagicRouterSetup.exe to bypass Windows 7 security protection.
AGREEMENT, DISCLAIMERS, PRIVACY AND TERMS OF CONDITIONS
Please read the following lines carefully before using this software. This End User License Agreement ("EULA") is a legal agreement between you, ("Customer" or "you"), and MagicRouter.net, My8z Info Holding Company Limited, Hong Kong. By installing, copying, or otherwise using any part of the above Software or any associated media, any printed materials, or any "online" or electronic documentation (the "Software"), you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, you are not allowed to use this program. You MUST then delete it immediately.
TRIAL-VERSION
You have the right to test this program for a period of one month. You are allowed to copy this Trial-version (and ONLY the Trial version) and give it to any other person, as long as it is not modified in any way. Under modifications is understood the changing, adding or removing of any files of this package without the author's written permission. You are NOT allowed to pack this program together with a commercial program or a book.
You are encouraged to put this program on as many BBS systems as possible. The distribution on CD-ROM is also permitted, as long as the original files are not changed in any way. Please let’s know if you want to distribute the program with a different installation program, changed files etc
You acknowledge that any Trial version is merely a technology demonstration which may not be at the level of performance or compatibility of generally available Magic Router products. Trial Versions are provided strictly on an "as is" basis.
Use of this software after the trial period of one month is in violation of international Copyright law! It is also unfair to the author, who has spent hundreds of days developing this program.
Limited features, stop for every 60 minutes, use up socket and memory.
REGISTRATION
This program is neither freeware nor public domain. Use after the 30 day trial period requires registration. The registration fee is only US$39 for a Magic Router Home Edition. See How to register for details on registration and support.
Your computer must access internet, connect to magicrouter.net server to make software activation. No activation will cause Magic Router unsable.
REGISTERED VERSION
Magic Router Home Edition can be installed on at most 39 computers. Magic Router Prof Edition can be installed on at most 59 computers. It may be used by any person in any time. Therefore you need only one license to connect computers.
If you have installed Magic Router on over 1 computer, you are not allowed to request REFUND.
ACTIVATION
You must agree to make activation between the Magic Router installed computer and our activation server. Ensure your computer network is able to connect to our server magicrouter.net. If activation fail, you may not run the software correctly.
FORWARDER VERSION
Agent Forwarder is derived from home trial edition. It is free, no warranty, same as trial version.
ACTIVEX VERSION
ActiveX is derived from home trial edition. It is free, no warranty, same as trial version.
ADDITIONAL VERSION
There is no additional license or multiple user licenses. If over installed, you need only simply purchase another single license. You need to keep recording which computer is using which registered license. Licenses and computers overlapping will decrease your allowed installations.
WARRANTY AND LIABILITY
A. Magic Router grants you a limited warranty that the software will perform in substantial accordance with the accompanying documentation for 30 days following your receipt of the software. This is your only warranty.
B. Magic Router's entire liability and your exclusive remedy for any claim you may have against Magic Router shall be, at Magic Router's option, (i) return of amounts paid for the applicable software; or (ii) repair or replacement of software which does not meet the above limited warranty; provided you return the software to Magic Router.
C. The software and the documentation sold with this publication are provided "as is" without warranty of any kind either express or implied, including but not limited to the implied warranties of merchantability and fitness particular purpose. The entire risk arising out of the use or performance of this software remains with you. In no event will Magic Router or any of its suppliers be liable for any lost profits, lost savings, direct, incidental or indirect damages, or other economic or consequential damages, even if they have been advised of the possibility of such damages. Magic Router reserves the right to modify this document at any time without obligation to notify anyone. In no event shall Magic Router's or its suppliers' liability under this agreement exceed the sum of any amounts paid hereunder by you to Magic Router or the supplier.
end text
We try to keep our software as bug-free as possible. But it's a general rule (Murphy's), that no software ever is error free, and the number of errors increases with the complexity of the program. That's why we cannot guarantee that this software will run in every environment, on any Windows compatible machine, together with any other application, without producing errors. Any liability for damage of any sort is hereby denied. In any case, the liability is limited to the registration fee.
LIMITATIONS
You may not decompile, disassemble, extract or otherwise reverse engineer any of the Software. You shall not have the right to obtain or use any source code for the Software, nor copy, reproduce, or distribute the Software except as provided above. You agree not to rent, lease, or loan the Software, nor use the Software to render time sharing of service bureau services. You may not use the Software in a software production "foundry" environment to make third party software ready for manufacture or installation. You may not make any commercial use of the Software code except as expressly permitted under this Agreement.
UPGRADES
If the Software is designated by Magic Router as an "Upgrade" product, then you may only use the Software if you are also currently a licensed user of the base product to which the Upgrade applies. Unless the Magic Router documentation for an Upgrade specifically provides, you shall not separate upgrade products from base products, nor transfer them separately. Magic Router reserves the sole and exclusive right to set its policies and prices regarding updates, upgrades and enhancements. All other terms of this EULA apply with equal force to any such Upgrades.
COPYRIGHT
The Software and documentation is copyrighted by Magic Router. Magic Router's copyrights include, but are not necessarily limited to © 2008-2012 My8z Info Holding Company Limited. All Rights Reserved. Making unauthorized copies is prohibited by law. No part of the software or documentation may be reproduced, transmitted, transcribed, stored in a retrieval system or translated into any human or computer language without prior written permission of Magic Router.
Please test this program with non-critical data. We cannot guarantee the safety of your data. Should you detect errors before registration, you accept them if you register. Any description of bugs will be accepted, but we cannot guarantee that we will be able to correct them.
AUTHOR
Alfee Kwok, MagicRouter.net, My8z Info Holding Company Limited, Hong Kong
Basically, input listen port, to port and to host(domain name or ip address), then click start(0) button will simply starting Magic Router. It supports TCP and UDP protocol, and listen socket bind to specific local ip. Select different local ip will protect Magic Router. If listen socket run locally, choose 127.0.0.1.
If it is running in UDP protocol, auto switch, qos, header forward, coding, firewall and quota are not workable.
UDP protocol is supported in standard routing and agent forwarder client.
UDP is not supported in qos, switch, header forward, coding, firewall, quota security, and all TCP related function.
Normally we use Load Balancing for common server like 80(http), 25(smtp). If your apache server is serviced over hundreds of concurrent connection in a second, it will become very busy and sometimes not responded. Then you should apply Load Balancing to improve the server response time. By defining a very simple spare ip,port list, you will solve and reduce your server response time. Of course, you should install your spare http, smtp servers yourself with identical service (data, pictures, information).
How to choose Method in Auto Switch
1. A list of servers >=2 and all of them have then same ability, take Auto.
2. If default server with higher ability, take Default.
3. If there are only 2 or several servers, and any 1 of them may mal function long time, take Switch.
No. of retry before switch server is design for Switch Method ONLY. If the current selected server has no response after timeout, the default server will switch to available spare server.
Auto Switch Combination
If you have more than 1 server farms, you can startup 3 Magic Router with Auto Switch ON.
The first Magic Router, set Method = Default, and point the default ip:port to the second Magic Router. And set a spare server ip:port point to the third Magic Router. The timeout must longer than second or third Magic Router.
The second Magic Router (with higher ability or stability), set Method = Auto, and all ip:port point to the first server farm.
The third Magic Router (with lower ability or stability), set Method = Auto, and all ip:port point to the second server farm.
How to fine tune Auto Switch – Timeout /ms
If you always get email notification about “Auto Switch - No available server !!”, you need to adjust the timeout time to higher values. If the last setting is 2000 ms, adjust to 4000 ms
If you are using Auto Switch in combination mode, the first instant Magic Router – Auto Switch Timeout time must larger then the second instant Magic Router. Since the first instant will always receive data later then the second instant.
Do not enable Header Forward when PassIp option is enabled. If you enable Header Forward, the forward side must be a Magic Router first.
Standard Routing supports auto switch. Start up router with auto switch mapping, defined ip:port will point to different forwarder. If pointed port and ip cannot contact, it will forward to another defined ip:port, another forwarder. Auto switch especially designed for smtp, pop3, database, and more. Of course, u can use another port as your need.
Beware that 1 forwarder need 1 user account on agent server. If you start up more than 1 forwarder client for auto switch, you need more users created on agent server, but password is dynamic. Listener defined password should match all forwarder password, otherwise auto switch will not function correctly.
1. Standard Routing Connect to Different Host:Port.
2. Standard routing with Auto Switch on + Forwarder.
Start up standard routing. If header forward enabled, detect header first. If no mapping found, router will try to connect default ip:port first. If auto switch enabled, router will select 1 mapping until connected.
If your application is send out signal after connect, the server service is support Header Forward. If not, you cannot enable Header Forward. To test server support Header Forward or not, try telnet YourServerIP Port. If telnet connected, but no message return, then this server service is support Header Forward. If signal return, it is not support. Mysql, smtp, pop3, ftp is not is not supported. MSSQL, remote desktop/terminal server, http server are supported.
QoS is a concept to retain your server providing a stable service. To control the bandwidth or data stream pass through between client and server, click advanced setting button next to "QoS" on Network > Standard Routing.
Simply, you need to input User,Ip,From,To,QoS is fine. If Magic Router run as server mode (set in Coding > Router Mode > Server), and user name / password is entered in User.txt, then you can setup QoS for the user. If no user to define, use *.
QoS value will return if the first rule is matched. If none found, it will not control the QoS. Therefore we always add a last rule to control undetected user or ip with limited QoS. QoS is in terms of kByte.
*,*,00:00:00,23:59:59,10
If you do not enable QoS Mapping in advanced setting, it will get the default QoS ONLY. And if you enter nothing inside QoS, it will not control the QoS.
If some server ip is accessing the listen port of Magic Router, and there is much data to query, should set the ip in Qos Mapping to bypass Qos. If not set Qos to 99999 to bypass, Magic Router will use up memory, crash and force to restart.
Qos Mapping sample:
admin,*,00:00:00,23:59:59,99999
*,127.0.0.1,00:00:00,23:59:59,99999
*,192.168.1.100,00:00:00,23:59:59,99999
*,192.168.1.0,00:00:00,09:00:00,1000
*,192.168.1.0,09:00:00,17:59:59,100
*,192.168.1.0,18:00:00,23:59:59,1000
*,*,00:00:00,23:59:59,100
Where 192.168.1.100 is the server query much data from server installed with Magic Router.
Also set 127.0.0.1 to no limitation by Qos = 99999.
If you have not enough ip for serving 2 server services using the same port, you can use header forward.
If 2 services, 1 is http, another is agent server, but they both using same port 80. you can setup Network > Header Forward. If the first data arrive from client, it will forward to specified ip and port according to connection header. If none match, using default.
We can connect to port 80 (Agent server installed) to bypass firewall detection. Actually, we can use 80 as http, remote desktop, agent server, databases at the same time. The performance will not degrade.
Support known protocol, Http(HTTP/), MSSQL(MSSQLServer), Agent Server(AGENTSAUTHENTICA), Samba, Databases, Remote Desktop(19+14+224) and more.....
Sample Header of known protocol:
Remote Desktop Header: 19+14+224
MSSQL odbc drvier Header: MSSQLServer
Http: HTTP/
Magic Router Agent Server: AGENTSAUTHENTICA
Some protocol using plain text as data header, like http, MSSQL. You simply type this line can do.
MSSQLServer,192.168.1.2,1433
of course, change the forward ip and port according to your network.
Some protocol using non keyboard characters as data header. Whatever you type from keyboard, output will not same as header. Therefore by using number from 0 to 255 to present the character, and + symbol to add all character together.
For example, starting Magic Routing with listen port = 3388, to host = 127.0.0.1, to port = 3389. Click start(0) to start routing. Then go to tools > log data, select 5 min and click start to capture data from mstsc (terminal service clie, nt). Run mstsc from command prompt and input 127.0.0.1:3388. If mstsc successfully connected to local terminal server (can see the login screen), then there will be some data captured in Datalog.txt file. Using hex editor to view the Datalog.txt, analyse it. You will find some characters are very strange or non empty string, this must be the protocol identifier. Take mstsc as an example, there is 3 characters, 19+14+224. Therefore the rule you input in Header forward text box is: 19+14+224,192.168.1.2,3389
If Magic Router run with TCP protocol, these features are supported. Header Forward, Auto Switch, Qos, Coding, Firewall, Quota. But UDP is not supported, since UDP is connectionless control, this is protocol limitation. Agent is support both TCP and UDP.
You can setup Remote Management as Monitor of Magic Router.
Make sure there are index.html and help.html files inside your Magic Router folder.
Before any changes, select config file first. Listen port is the port to connect monitor, allowed ip subnet is to protect monitor from being access by other network. After input admin user and password, remember to click save button and start(4) button.
If you need remote management, index.html must be included under the same folder of MR.EXE
Start Remote Management by this link http://ServerIp:Port/index.html. If the subnet of ServerIp is not same as allowed ip subnet, you will not allow to login even you input the correct user name and password.
The following functions are included in index.html page.
Connections:
Standard Routing Connections
Agent Server Connections
Agent Listener Connections
Agent Forwarder Connections
Agent Server User Status
Block Ip/User: select option, then input ip or user to block connection.
Drop connection: find out the item number in connection list, select option, then input the item number to drop connection.
Actions:
Restart Standard Routing ONLY
Restart All Listen Ports, include standard routing, remote management listen port and Start Button Sequence in Misc. page
Shut Down Magic Router
Command: Type in any command, click send to run command on the computer/server that installed with Magic Router.
If you cannot connect to VNC Server, type the following to restart.
NET STOP "VNC Server"
NET START "VNC Server"
Settings:
See Help parameters.
Tools:
Add/Remove Black/White Ip in Text File/Memory.
Log data.
Help: Help on Parameters and Descriptions
Network:
-lp Listen Port
-lh Local IP
-tp To Port
-th To Host, domain name or ip address
-pr Protocol, 0=TCP, 1=UDP
-mp Remote Management Listen Port
-rp Allowed IP SubNet, 0.0.0.0 = no control
-ru Admin User
-rw Admin Password
-hf Enable Header Forward, 0=Not, 1=Yes
-hd Header Forward Definition, ie. AGENTSAUTHENTICA,127.0.0.1,2222
-qs QoS Value, in terms of Kbyte
-qo Enable Advanced Qos, 0=Not, 1=Yes
-qm QoS Mapping, ie. admin,*,00:00:00,23:59:59,99999
-s1 Enable Auto Switch, 0=Not, 1=Yes
-s2 Try next server when timeout / ms
-s3 No. of retry before switch server
-s4 Method, 0=Auto, 1=Default, 2=Switch
-s5 Spare Server Definition, ie. 192.168.1.10,5955
-s6 Action, If no available servers, take action, send mail, 0=Not, 1=Yes
-s7 Action, If no available servers, take action, run command.
-bs Socket Send Buffer, 1024 to 64512
-br Socket Receive Buffer, 1024 to 64512
-pp Small Packet, 0=Not, 1=Yes, data always less than 100 byte is small packet
-b1 Bind Non Local Computer IP, 0=Not, 1=Yes
-d1 Network Adapter Interface Index, check with Route Print
-pi Pass ip, pass remote ip from 1st MR to next MR, 0=Not, 1=Yes
-f1 From FTP Data Port, default=2001
-f2 To FTP Data Port, default=2004
-f3 Translate Private Ip to Public Ip, must input, no domain name.
Coding:
-pc Router Mode, 0=Alone, 1=Client, 2=Server
-me Encryption, 0=none, 1=Compress, 2=AES, 3=Compress+AES, 4=Shift, 5=SSL3
-ke AES key, max 32 characters
-sb Shift Bytes by, 1 to 254
-ac Enable Authentication, 0=Not, 1=Yes
-au Authentication User Name, must found in server user.txt or table
-ap Authentication Password, must same as server user.txt or table
-ul User List, 0=user.txt, 1=database
-ss Command Line to Start up SSL v3 Secure Tunnel
-as User Access Time, 0=Not, 1=Yes
-st User Access Time Setting, User,Ip,From,To,WeekDays
ie. *,00:00:00,23:59:59,1234567
ie. *,192.168.1.0,00:00:00,23:59:59,23456
where 1=Sunday, 7= Saturday
Firewall:
-fi Enable Firewall, 0=Not, 1=Yes
-fp= Max Conn Per Ip
-fa Max Connection All Connections
-ff Hit Values, ie. 15,60,200;150,600,2000;300,130
-fm Detection Multiple, 1 to 99
-fb Add Black Ip, 0=Not, 1=Yes
-fw Allow White Ip ONLY, 0=Not, 1=Yes
-fx Black IP Mode, 0=txt, 1=table, 2=DNSBL
-fy White IP Mode, 0=txt, 1=table
-fd DNSBL Domain
-fu Using White Ip, 0=Not, 1=Yes
-fk Keep Firewall Record For Days
-fs Reset Lock, by hour, also apply to agent server, 0=not lock.
-if Intelligent Firewall, 0=Not, 1=Yes
-dd Enable DDOS, 0=Not, 1=Yes
-d1 Network Adapter Interface Index, check with Route Print
-dp DDOS Packet Threshold, 1-65535
-dt DDOS Packet Timeout /ms, 1-65535
-dr DDOS Attack Run App, ie. alarm.wav
-de DDOS Attack Notify by email, 0=Not, 1=Yes.
Quota:
-qc Enable Connection Quota, 0=Not, 1=Yes
-q1 Bytes Sent/Receive Per Connection In Hour/Day/Mega Values, ie. 100,200;100,200
-qi Enable Ip Quota, 0=Not, 1=Yes
-q2 Bytes Sent/Receive Per Ip In Hour/Hour/Mega Values, ie. 200,400;200,400
Misc.:
-lo Log Error, 0=Not, 1=Yes
-lc Log Connection, 0=Not, 1=Yes
-di Show Main Screen on Startup, 0=Not, 1=Yes
-la Language, reserved
-nf Firewall Attack Notify by email, 0=Not, 1=Yes.
-nq Over Quota Notify by email, 0=Not, 1=Yes.
-ng Firewall Attack Run App, ie. notepad.exe
-nr Over Quota Attack Run App, ie. wordpad.exe
-ne Notify Email Address
-re Auto Restart Router By Days, 0=not restart
-at at, 0 to 23
-id Kill Idle Connection By Days
-sc Start Button Seq., 0,4 is default, see help for more on settings
-sr Service restart if no response by seconds
-pw Save Password, 0=Not, 1=Yes
-bo System Service Booster, boosting running speed, 0=Not, 1=Yes
-bu Buffering data to Magic Router will increase application server stability, FTP protocol is default 0, 0=Not, 1=Yes
Agent:
-sp Agent Server Local Port
-si Agent Server Local IP
-sd Listener Client Port Forward Definitions, ie. 0.0.0.0,3388,192.168.1.234,3389,TCP;0.0.0.0,5901,192.168.1.234,5901,TCP
-sq Client Common Server Port
-sj Client Common Server IP, domain or ip address
-su Listener Client User Name, must same as forwarder client, and found in agent server user.txt or table
-sw Listener Client Password, must same as forwarder client
-sx Forwarder Client User Name, must same as listener client, and found in agent server user.txt or table
-sy Forwarder Client Password, must same as listener client
-sa Client Common Connection Keep Alive, 0=Not, 1=Yes
-b2 Listener: Bind Non Local Computer IP, 0=Not, 1=Yes
-d2 Listener: Adapter Interface Index, check with Route Print
-b3 Listener: Auto Bind Port, 0=Not, 1=Yes
-px Listener: Bind IP/Port, 192.168.100.1,137-139
-ef Forwarder: Allow Rules, 0=Not, 1=Yes
-ec Forwarder: Allow Run Shell Cmd on Forwarder
-es Forwarder: Allowed Rules Setting, Ip,Port,From,To,WeekDays
ie. 192.168.1.1-10,137-445,09:00:00,18:00:00
-df Forwarder: Block Rules, 0=Not, 1=Yes
-ds Forwarder: Blocked Rules Setting, Ip,Port,From,To,WeekDays
ie. 137-139,18:00:01,23:59:59
-mf Forwarder: Max. Allowed Connections for Forwarder, 0=Unlimit
-af AgServer: Auto Trigger Forwarder, Simulate VPN Server, 0=Not, 1=Yes
Obviously, if use magic router as the service listen port and forward to final application server, all remote ip is 127.0.0.1 or local host computer ip, ie. 192.168.1.x.
We provide the following way to get true remote ip. Remember to set allowed ip subnet, otherwise remoteip.html will return nothing.
Internet Explorer to return, if you know the port:
http://192.168.1.1:8888/remoteip.html?P=12345
Visual Basic sample code to get true remote ip from Magic Router:
Set oXML = CreateObject("Microsoft.XMLHTTP")
oXML.Open "Get", "http://192.168.1.1:8888/remoteip.html?P=" & Socket(Index).RemotePort, False
oXML.Open "Get", "http://192.168.1.1:8888/remoteip.html?P=" & Socket(Index).RemotePort & "&T=" & Int(Rnd() * 1000000), False 'using localhost is very slow response, use 192.168.1.x instead, but need to set allowed ip subnet in remote management to 192.168.1.0 and password
oXML.Send
Debug.Print oXML.ResponseText
PHP to return:
<?php
//you can overwrite $_SERVER['REMOTE_ADDR'], put this overwrite coding at the very beginning of php pages.
//echo "Before overwrite ip: ".$_SERVER['REMOTE_ADDR']."<br>";
$_SERVER['REMOTE_ADDR'] = GetRemoteIP();
//echo "After overwrite ip: ".$_SERVER['REMOTE_ADDR'];
function GetRemoteIP()
{
$handle = @fopen("http://192.168.1.1:8888/remoteip.html?P=".$_SERVER['REMOTE_PORT']."&T=".rand(), "r"); // where rand() is must, force to update, not to check cache
if ($handle) {
$contents = stream_get_contents($handle);
if ($contents) {
$RemoteIP = $contents;
} else {
$RemoteIP = '127.0.0.1'; //do not return non ip string if fail, return a default.
}
} else {
$RemoteIP = '127.0.0.1'; //do not return non ip string if fail, return a default.
}
fclose($handle);
return $RemoteIP;
}
?>
PASS IP Option in Remote Management
If you connect Magic Router to Magic Router, the second Magic Router will always return the ip (search remoteip.html for reference ) of 1st Magic Router. Therefore you need to enable PASS IP in the first Magic Router, the first 1 will pass the true remote ip to next connected Magic Router. The second Magic Router do not need to enable. If you enable it, the final application server will receive incorrect data.
PASS IP is support in Standard Routing, and Router Mode = Standalone or Router Mode = Server, not support in Agent/reverse connection.
What is the purpose of PASS IP ?
Passing ip to the last Magic Router, web server (Apache) can query the true remote ip by http://192.168.1.x:8888/remoteip.html?P=12345
PASS IP is special design for Auto Switch / Load Balancing. If there are many Magic Router connected, remote ip of socket will become meaningless, you need to enable PASS IP. The last Magic Router connected to application server is not needed.
Local ip Advanced Settings, allow free input and non local ip. To bind non local ip, you must select true network adapter in advanced settings.
Non local ip can be used as NAT simulation. Input public ip in "local ip", input local network ip to "to host". local network ip can be local computer ip or other computer ip.
It is not necessary to input public ip in network adapter (but enable bind non local network ip), Magic Router will help to bind the public ip on true adapter temporarily.
Starting listen port as 139 will stop file and printer sharing on local computer. If Magic Router stopped, the binded non local ip will be released.
Example:
222.123.34.56:80 point to 192.168.1.1:80 (Start with Magic Router config.1.txt)
222.123.34.57:80 point to 192.168.1.2:80 (Start with Magic Router config.2.txt)
See Agent Client for more flexible usage of non local ip.
Some notes on NAT
There is an alternative standard method of NAT like ip return.
1. Clear the NAT in hardware router.
2. Setup HOSTS file in local computer inside LAN, for desktop ONLY , no laptop,
3. Editing c:\WINDOWS\system32\drivers\etc\HOSTS, write a line at the end of HOSTS file.
192.168.1.10 http://www.YourDomain.com
4. http://www.YourDomain.com will direct point to local network without requesting WAN hardware router.
Why do we use HOSTS file instead of hardware router ?
1. If hardware router down, local computer will unable to access 192.168.1.10. Since NAT is needed to resolve by WAN hardware router.
2. HOSTS file is run locally on user computer, will never touch WAN hardware router.
3. Therefore NAT by local computer is much stable than translate by hardware router.
Adjusting the send and recv socket buffer size (from 1024 to 64512) will highly increase data transfer performance. If using Magic Router to transfer file, large buffer size is recommended. If running remote control through (VNC) Magic Router, small buffer size is suggested (ie. 8192).
Small Packet, if data between your application client and application server is always less then 100 byte, Small Packet option is suggested. This will avoid traffic congestion.
As Gateway, switch the local computer to become gateway.
Magic Router version after 2.2.0 is support Passive Mode FTP Server routing. By defining a standard listen port = 21, protocol = FTP (-pr=2) and data ports in advanced page, default data port range is 2001 to 2004. After settings in Magic Router, add defined ports in your windows firewall.
Magic Router can translate ftp server private ip to public ip, ftp dynamic data port to static data port (2001 to 2004). 4 data ports is suggested (according to IIS Ftp server design). If there are always over 4 users with the same remote ip accessing your ftp server, you can widen the data port range. Of course you need to open more ports in windows firewall.
Magic Router FTP Routing is support infinite routing, Magic Router FTP mode route to another Magic Router FTP .....
Limitation:
1. Must select valid local/public ip to listen,
2. Support these features ONLY: Qos, Router Mode = Alone, Access Time, Firewall, Quota.
Coding include router mode, encryption, authentication and user list.
Router mode, if you want to create a secure tunnel between "true" application and "true" server, select client as client side Magic Router, select server as server side Magic Router.
Of course, to create secure tunnel, both client or server side need to start up Magic Router. For simple testing, do not select any encryption or authentication. Simple start up a client-server tunnel first, then test with your application and "true" server.
We will not consider to use ssh/ssl/certificate .... From our experience, it is very hard to use and not easy to implement. Magic Router has another ActiveX client version, you can create client-server secure tunnel easily without using certificate in any computer.
(SSL3 is supported after version after 1.0.0)
Additionally, if your client computer is hijacked by hacker, ssh/ssl/certificate is meaningless. To protect data transfer, apply "Anti Memory Dump" module on your application. If you need support, pls contact us.
(SSL3 is supported after version after 1.0.0)
Compression of data reduce 50% of time of data transfer. If using database as server, will get better performance.
AES, Advanced Encryption Standard, common used encryption method. Both client and server should input the same AES key.
Compression + AES, it may not reduce the time and increase the data security. It depends on what server service is used. You can try, if performance is not good, change it to AES only.
Shift Byte, a very simple encoding method, just to shift you data byte value. If the first byte of data is 1 and you input the shift byte by value is 5, the final data byte will become 6.
Why we use shift byte:
. very less cpu usage, data changed will not easily recognized by filter program.
. use this encryption only if you data between client and server is not sensitive.
. We will discuss on how to apply simple shift on application sample.
Client and server sides may not need to select the same Compression or AES or both. If you find data from client is not safe or is plaintext, select AES or compression. Data client always send data out with plaintext. Normally, data transfer from server to client is encrypted by their standard, we will not easily understand. Therefore server side Magic Router do not need to select AES/compression. Be notice, select AES/compression will use up a little bit cpu time.
IF select shift byte, both client and server should input the same value, otherwise decoding will not correct.
SSL3 is a OPENSSL standard. Stunnel module will be loaded at the same time. If you need you own cert. to connect to server side, see stunnel\stunnel.html for more detail.
Authentication, used to control client access server. If username not found on server, and password is not correct, the connection will reject. Once input username, client and server side Authentication must select enabled.
User List, if you are not good in access/jet engine, use plain text as user list (user.txt). If your server os is higher version then Windows NT, no need to install jet engine patches.
You can add user through editing user.txt/DbcStore.mdb or by interface, input user name and password, then click add button.
Standard Routing with Router Mode = Server is using the same user list as Agent Server. If you need different user lists, you must copy the complete MagicRouter folder to another location. Then start Agent Server from copied folder\mr.exe.
A popular secure tunnel module is embedded in Magic Router after version 1.0.0, it is a OpenSSL standard. If you need to setup your own or registered certificate, see more on stunnel\stunnel.html
If you need to identify which exe is running for that Magic Router, you can start up different command other than default, ie. \stunnel\stunnelx.exe stunnelx.conf.
Magic Router ActiveX Client is also support SSL3, Encryption Method = 5.
If you start up more than 1 SSL tunnel, you need to manually copy stunnel.exe to stunnelx.exe or any file name used in parameter.
If you start up more than 1 SSL tunnel, you need to manually copy stunnel.conf to stunnelx.conf or any file name used in parameter.
SSL module will auto stop and start before creating tunnel to ensure there is no dead exe running.
Access Time, controlling Magic Router Client with user authentication to access Magic Router Server. Both client and server side must enable authentication.
Sample Setting, ie. User1,09:00:00,18:00:00 or *,00:00:00,23:59:59 for all user.
Access Time in Coding is now support for all router mode, client, server and standalone since 2.2.0. If run in router mode = standalone, user is independent.
Access Time is now support weekdays since 2.2.0. You can leave empty in last parameter to bypass checking on weekdays. Where 1 = Sunday, 2 = Monday, 7 = Saturday. Find the following example
Access Time in Coding:
*,*,00:00:00,23:59:59,23456
Admin,*,00:00:00,23:59:59
Access Rules in Forwarder Client Advanced setting:
192.168.1.1-10,137-445,09:00:00,18:00:00,123456
192.168.1.20,09:00:00,18:00:00,246
80,00:00:00,23:59:59
Remark: Access Time is process after firewall detection.
Click enable basic to start setting firewall. There are 3 type of setting
1. Max. Concurrent Connection per ip, each ip is allowed connection. If over this connection number, firewall will block it.
2. Max. Concurrent Connection, all allowed connections under an instant start up of Magic Router. Since os is not allow over 65536 socket, and each thread is not allow over 32767 socket. Therefore you cannot set too many for each start up. Suggested value is less than 10000. Too many you system will busy, this is not Magic Router limitation, is the server service quality of service control.
3. ip/group/all ip hit in minute/hour/day. Hit means connection request on Magic Router. Some service need connect once, like database. Some need to connect for each access, like http.
If Magic Router is already started, click apply changes button to take effect.
1. If checked "Using White Ip", firewall will find ip in white ip txt or table. If found, it will bypass firewall detection.
2. If you checked "Using White Ip", ip found in black ip list will be ignored.
3. Checked or not checked "Add Black Ip To", firewall will either check BlackIp.txt or BlackIp Table. If found ip, it will block the ip.
4. If you check "Add Black ip To", it will insert to txt or table. Later connection with the same attack ip will be blocked.
5. If you check "Allow White Ip ONLY", ip not found in white ip list will not allow to connect.
6. DNSBL, if you use DNSBL, you should find a DNSBL server. You can find some free service on Internet. DNSBL most likely used for smtp, port 25, for filtering spam email ip.
7. These settings also apply to Quota.
Select text or table for white/black ip:
If your computer have enough memory and fast enough, if you need to load over 1,000,000 ip, select txt file. The performance will much better than using table. If your computer is not fast, use table, much less cpu and memory usage.
Notes: if firewall is enabled, dbcstore.mdb file is needed.
Nowadays, most computers cpu is much faster than hardware router. If you have many computer/servers need to protect, using hardware router will highly delay the data transfer. You can start up Magic Router with standard port forward and firewall protection on machines for specific port. Magic Router Firewall and Quota is specially designed to protect port.
MR Firewall do not have security control, it is used for detection. If you need authentication, go to coding, select authentication or add/remove user to control connections.
It is a firewall to protect a specific port, you can start up more than 1 piece of Magic Router, to protect more than 1 port.
Magic Router include a very fine firewall protection, avoid hacking DOS attack a port. Most of the firewall is not specific to protect a port. Once a port is opened, protection is done by server application itself. If the application protection is not strong enough, hacker can continuous send connection command to the serviced server, making connection overflow. or hacker can continuous send data to server, and hold the connection bandwidth.
Therefore to protect the server, by using port forward. For example, you can open a port smtp 25, open to listen by Magic Router, and forward to another not used port, like 2025 (final server service port). Then any connection to port 25 will by handle by Magic Router and build in firewall. Magic Router will protect the port according to setting.
Protection includes connection hit, by minute, hour and day. Data quota, control the amount of data is allowed by single connection or single ip. IP detection includes single ip, group ip and all ip, if over the upper limit, the firewall will stop the ip, or if all hit is meet, the port will delay until hit is under upper limit.
If over upper limit, ip will mark as black ip, and block to access.
You can open more than 1 port but share the same blackip.txt or blackip table. If you want to use blackip.txt for specific port, copy the entire magic router folder to another folder. Start mr.exe in copied folder with different config and blackip.txt.
If your computer has large enough memory, you can select to use BlackIp.txt (over 1 million black ip). If memory is not enough, you can select to use BlackIp table. All black ip stored in database table for less memory access.
BlackIp.txt or WhiteIp.txt support over 1,000,000 ip, startup smoothly and will not degrade system performance.
We have tested firewall performance. If enabled firewall inside Magic Router and there are over thousands hacking connections in, The firewall can block the connections correctly by setting up suitable firewall parameters (hits).
DNS protection on port 53 by DNSBL enabled, and firewall started.
The above method is useless. DNS is designed with UDP protocol, it process request very fast, no protection is required.
You can set Reset Lock from 1 hour to 99 hour. Reset lock on ip is auto release on lock, no need to menu clear. Release lock is because of user accidentally fall in firewall detections. It will not permanent deny user access server.
Intelligent Firewall, enable it will protect connection to the last second. Hacker may use a number of infected computers to send out attack signal on your server within a minute. The accumulated or excess request on computer will causing the application server fail to response, as a result of service deny (DOS Attack).
How does intelligent firewall work:
1. statistic all distinct ip connected.
2. record individual ip connection count.
3. if concurrent total connection almost over max. connection (ie. 1000), Intelligent Firewall will take action, record the unreasonable access ip to IP Security System Service
4. IP Security System Service is a powerful security module since Windows 2000. There are different program/exe needed to download according to different O/S.
5. If no Intelligent Firewall, you need to manually add hacker ip on IPSEC or firewall. It is a hard mission.
According to different O/S and license limitation, we cannot include all related files inside Magic Router Bin sub folder.
1. Windows 2003/Windows Vista/Windows 2008/Windows 7 with build IPSEC tools, you do not need to download.
2. Windows XP, you need to download ipseccmd.exe from Windows XP Service Pack 2 Support Tools Download.
Microsoft link http://www.microsoft.com/en-us/download ... x?id=18546
After downloading and installing WindowsXP-KB838079-SupportTools-ENU.exe, find the ipseccmd.exe under installed folder. Then copy it and store it in Magic Router Bin sub folder.
3. Windows 2000, you need to download ipsecpol.exe from IPSEC Policy Configuration Tool
Microsoft link http://www.microsoft.com/en-us/download ... x?id=16166
After downloading and installing ipsecpol_setup.exe, find C:\Program Files\Resource Kit. Then copy all files and store them in Magic Router Bin sub folder.
Normally you do not need to clear IPSEC manually. If Intelligent Firewall find current state is safe, it will automatically clear all black ip in IPSEC. If you are testing as hacker and attack server that installed with Magic Router, you may need to clear IPSEC for your need.
Another way to clear IPSEC is to restart IPSEC System Service, it will clear all ip blocking.
To minimize the memory used by IPSEC, it is recommended not to select 0.0.0.0 as the listen local ip address in the Network page.
If you select fixed ip, ie, 192.168.1.10 or 127.0.0.1, IPSEC will run much faster, lesser memory used and support over 100,000 black ip in case of bulky hacking ip attack.
1. Keep firewall record for days. Keeping the database size small, and letting you analysis network traffic for listened port.
2. Detection multiple, from 1-99, default is 10, designed not to use up too many cpu usage and keep high detection accuracy. 1 is most accurate but will use up cpu. 99 is less accurate but good for slow computer.
3. Reset Lock, if ip is locked, it will release after the hour you specify. 0 is not release, the detected black ip will not release. If you want to release the black ip, go to tools > Add/Remove ip.
. DDOS Detection and Protection are used to protect your service port from being attacked by hacker.
. Magic Router is support TCP Flooding protection ONLY.
. If you need a UDP or ICMP detection, you can download a free DDOS Detector from our support centre.
Setting up TCP Flooding Detection and Protection:
. go to Firewall > enable IF > enable DDOS Setup,
. the first figure shows the total packet of listened port, the 2nd is total attack count.
. then select correct adapter to listen packet first.
. DDOS Packet Threshold (1-65535) is used to trigger DDOS protection. If over this threshold value in a second, MR will handle the timeout packets.
. DDOS Packet Timeout /ms (1-65535) is used to control packets are timeout or not. MR will delete half open TCP SYN packet if connection timeout, delete only if DDOS protection is triggered.
. Action, if DDOS attack, take action, run command or send email.
Advanced Settings in Firewall are also applied to Quota.
Quota page is controlling amount of data flow through single ip, or single connection. This service is useful, especially for database server. Consider if there is an internal hacker, he want to query all customers, sales order record from server through the application in a day. If the server have no protection or limitation, he can query all the data, save or printing out. All data is being stolen without hints. If quota applied, set to allow the amount of data in an hour or day, if over upper limit, Magic Router will reject connection, and send email notification to administrator. Then you can lock the ip to access or any action you can take to protect data.
Ip quota, ip may be a single ip from remote office, the upper limit should set higher to avoid user always being blocked to access.
Connection quota, single connection is access by single user, you can accurately set lower value. Of course you should very clear how much data is always pass through in a single connection. For example, the service port is a streaming server, you should set higher, If it is a database server, you should set lower.
Bytes sent means, max. allowed data in terms of mega bytes, send from client application. Bytes sent from client is always much less than receive.
Bytes Receive means, max. allowed data in terms of mega bytes, receive from true server back to client application. Bytes receive is always higher than sent.
Setting up these 8 values correctly or accurately is not easy, you need to set higher at initial stage To observe the amount of data pass through a ip or connection, click panel control > conns button, you will find there is 2 ByteIn columns. 1 is send, another is receive. Even though setup is hard, but will highly increase the data security.
If you need more information on connections, open dbcstore.mdb, there is a quota table, record the data in or out by time by ip.
If over quota reach, the ip will become black ip stored in either blackip.txt or black ip table.
1. Log error, log all error to errlog.txt. If Magic Router is not started up, you will find the error or answer in errlog.txt. For any case, if you find problem or ensure Magic Router is running smoothly, check errlog.txt regularly.
2. Log connection, this is used to trace what ip is connected, or if you enabled firewall, you can find many record in dbcstore.mdb. Log connection will log not only standard routing, but also log agent server connection and listener client connection.
3. Show main screen on startup, if you don’t need to config values in all pages of Magic Router, uncheck this value.
4. Save Password, is used to save frequent input password for user. The password saved is encrypted and accorded to computer hardware. If the saved config file share to other computer, the password will not correct decrypt.
5. Booster, System Service Booster, special design for fast response application. For Example, if you run Magic Router for file sharing client (File Explorer), and run Magic Router as Agent Server with Auto Forwarder on File Server, transferring files or listing files will double faster.
6. Support English, Chinese GB/Big5 user interface.
7. Kill idle connection by days, sometimes computer connected and shutdown by hibernation, the connection will not terminate, you need to kill idle by days, otherwise unused connections will hold the socket, use up resource.
8. Auto restart router by, this is seldom used, Magic Router is stable, is expected, no restart is require. If Magic Router is not running stable with you server service. try to restart Magic Router, and observe why Magic Router is unstable.
9. Start button seq., this setting is frequently used. If you start up a service without user interface, you need to tell router what action to take after startup. If you don't tell Magic Router, it will only startup, and will not start any listen button.
10. Service restart if no response by seconds. Under system service, if MR*a.exe has no response, MR*.exe will restart MR*a.exe. If the true application server always busy over minutes, set higher for this value to avoid Magic Router restart too frequent.
11. Firewall attack, if max. hits reached, email will send out or run specified application/program.
12. Over quota, if max. quotas reached, email will send out or run specified application/program.
13. Magic Router build in SMTP Engine is not support SMTP account, it will direct send out notice email to email server. You must test the email address. If fail to get test email, see errlog.txt for reference.
14. Buffering, Buffering is used to buffer application server (database, email, http...) outgoing data to Magic Router. Such process can increase application server stability. Standard Routing > Protocol = FTP is default disabled.
1. Convert black or white ip text file to database vise versa. After some time, if you find txt or table performance is worse, you can convert ip list.
2. Repair database, if file is too big that filled with spaces, or database is corrupted that cannot start up firewall, repair it.
Manually add or remove black or white ip to text file or database table. You can also remove black ip from memory by typing correct ip in text box.
Add/Remove ip, if you use txt as black ip list, add or remove ip will synchronize to memory. If group ip hacking detected and you remove the hacking ip, the group ip blocking will not release. For example, if remove 192.168.1.10, and 192.168.1.0 is blocked, when 192.168.1.11 is accessing, it will reject. To release group ip block, you need to issue 255 times remove ip. add/remove black/white ip, apply to firewall and quota.
Log data, analyze data coming in or going out. After click start button, there will be a DataLog.txt file. Log data is not a sniffer On the other hand, you can record all data in and out, especially for inspecting encryption, compression, protocol header.
Shell Cmd on Forwarder, if you use listener client to connect to forwarder client through agent server, typing command on text box and enter, exactly equal to run command on forwarder (remote computer). There are some internal command (By Magic Router), that is not found in Windows, ie. WOL, CON, GET, PUT.
WOL=Wake on lan. CON=Connect to computer with port test. GET=Download file from forwarder, where path and file should found in forwarder, PUT=Upload file to forwarder, where path and file should found in listener. Other Windows commands depend on system. Like taskkill, not all os installed with this tool.
Shell Cmd Tools Usage Example.
Internal command:
WOL AABBCCDDEEFF
where AABBCCDDEEFF is the MAC of network adapter.
CON 192.168.1.2 5955
separate ip and port by single space
PUT "C:\temp\test.txt"
put local computer file to remote root of Magic Router Folder.
GET C:\autoexec.bat
get remote computer file back to local Magic Router Folder.
PUT or GET command should use full path.
Supported Windows Shell Cmd:
Most of the supported/useful commands are list in text box.
ipconfig, ping, arp, tracert,
nslookup, netstat,
route, taskkill, tasklist, net, netsh,
dir, type, whoami, net, systeminfo,
notepad, explorer, return saved in
C:\Result.txt
Starting Agent Server + Listener Client + Forwarder Client as Wake on Lan Tools. Magic Router is support shell command on forwarder. If you start all Agent Server + Listener Client + Forwarder Client on the same interface, it can be used as Wake on Lan Tools.
Start Agent Listener on computer1 in network A.
Start Agent Forwarder on computer2 in network B.
Issue the following command on Tools > Shell Cmd on Forwarder:
NET SHARE Temp$=D:\TEMP
NET SHARE (no parameter to show all share folder on remote computer)
Then Start up File and Printer Sharing by command line if not enabled:
netsh firewall set service type = FILEANDPRINT mode = ENABLE
Magic Router have internal simple upload and download file command, PUT OR GET. However if transfer files operation is too frequent, you can install ftp like SlimFtp on remote computer instead of Magic Router PUT OR GET internal command. SlimFtp is very slim.
Magic Router PUT OR GET internal command support simultaneous operations, you can issue PUT or GET for more than once to transfer different files.
Sample command to upload file from Agent Listener side to Agent Forwarder side:
PUT c:\temp\test.dat
test.dat file will upload to Forwarder program folder
Sample command to download file from Agent Forwarder side to Agent Listener side:
GET User.txt
User.txt will transfer download from Forwarder program folder to Listener program folder.
GET c:\temp\User.txt
c:\temp\User.txt will transfer download from Forwarder c:\temp to Listener program folder.
It is used to view raw packet throughout network adapter. Additionally you can click "Create PFD" button to create Port Forward Definition. This is specially used for agent listener to find out which IP or Ports to bind on selected network adapter.
A powerful tools connecting computers. Agent means connecting 2 computers virtually by a agent server, where agent server is used to connect 2 computers from different or same network.
1. For example, if you want to connect computer C by computer A, where A is in country 1 and C is in country 3 and behind a router with no NAT is set. General method is creating a port forward on C side router. It is very clear and very simple if you are very good in IT. But if the router is not allowed you to setup (control by administrator), you cannot create port forward on router. Then you cannot connect by standard routing.
2. If both 2 computers can access Internet, they can be connected virtually under all kind of TCP/IP network. Even though you are not good in IT, you can connect easily.
3. If your office network/firewall is allowed only port 80 to connect out, then using Magic Router Forwarder Client will bypass firewall detection.
4. Access computer D by computer C, by easily setting up port forward definition on listener client.
5. See more on Sample Application forum, there are more clear description and diagrams.
1. Agent Server (computer B) as a middle computer connecting another 2 computers. Agent Server / Listener Client / Forwarder Client can be started on the same computer. Simply, input local port and click start(1) to listen.
2. Listener Client (computer A) as a listener (as service port on server). Input server port and ip in Client Common, user name and password in Listener Client, then click start(2) button to listen. Where user name and password must same as Forwarder Client, and user name must be created in agent server (computer B) user.txt or user table.
3. Forwarder Client as a computer on remote side. Input server port and ip in Client Common, user name and password in Forwarder Client, then click start(3) button to listen. Where user name and password must same as Listener Client, and user name should be found in agent server (computer B) user.txt or user table.
4. Keep connection alive, checked Keep Alive in Client Common will keep tunnel connected.
5. Encrypt Command, if checked, command used by Magic Router under tunnel will be encrypted. But will find a little busy while uploading or downloading file from forwarder to listener by PUT/GET command.
6. Password used by listener or forwarder must be the same, but not necessary same as agent server user list. This dynamic password is used for anti-hacking. Only listener or forwarder know the user password, 3rd user will not know. User name created on agent server is used to control authentication.
7. If bi-directions (forward and backward) connections are used, you can set listener and forwarder on the same interface, but listener and forwarder user name must be different, and 2 user right is needed on agent server. Then 1 instant of Magic Router can act as 2 roles, as listener and forwarder at the same interface.
8. If you want to make a self test, click start(1),start(2),start(3), ip using 127.0.0.1. You can issue command on tools > shell cmd on forwarder, view connections, view agent server user status. I like issue IPCONFIG, or SYSTEMINFO to see remote forwarder information.
. Agent server likes vpn, you can use agent client and server as vpn like connection.
. Start agent server on forwarder on B network, start agent listener on A network. After make connection, A network can access B network anywhere. But provide that you should have a user right to access that server service.
. If there is no public ip on both side, computer 1 in local network A and computer 2 in local network B, by connecting listener and forwarder to public IP, then computer 1 AND computer 2 connected.
. You can issue any request from computer 1 to computer 2.
We provide a 1 year free agent server service, but we cannot guarantee it is 100% up. We will not responsible for any lost due to this free service or fail to connect. User Name / Company Name (your registered email address) is the login user name, password is dynamic. If listener and forwarder password match, tunnel will be created.
OUR Agent Server Address
Ip: www.magicrouter.net
port: 80 or 2222
if your company block access to 2222, you can change to 80. Normally port 80 is for access http server, seldom block in router firewall.
1. Create tunnel by Listener Client + Agent Server + Forwarder Client.
2. Set port forward definition 0.0.0.0,110,192.168.1.1,110,TCP in Listener Client.
3. Start up email client, set and connect to local address port, 127.0.0.1:110, same as direct connect to public ip to get email.
4. Then by reverse connection, your email pop3 server no need to expose to public.
Of course we will not open POP3 to 1 user only, you can consider another server service need a secure connection, like terminal server, vnc, those are only access by administrator.
Passwords used by Listener/ Forwarder setting are dynamic, password not stored on server. To make both listener and forwarder connect, both side user and password should match.
1. Start Agent Server first.
2. Start Agent Listener (connect and send port definition).
3. Start Agent Forwarder.
4. Apply Changes by Agent Listener if necessary.
If you think open a port for a service is not safe, like remote desktop or vnc or ftp, you can use reverse connection. By starting up forwarder, input ip , port and user of you preferred agent server, then click start to connect.
After creating your private tunnel, none can access your computer inside a local area network. If you want to connect your computer inside LAN, start Magic Router, go to Agent, input ip , port, user and password of you preferred agent server. Then start you application program, point to ip (normally 127.0.0.1) and listen port, then your remote computer will be connected.
Starting up Forwarder Client (in network B) with Port definition from Listener Client (in network A), Listener Client completely same as inside network B, access from remote site. All ip access using 127.0.0.1 with defined ports by Listener Client. Therefore you will find very simple to access internal network. But remember, if your client common password is disclosed, all network inside maybe hijacked. If you don't use forwarder after administration, stop it. Starting Forwarder is much more easy than to create VPN, only few clicks and single exe is needed.
To make forwarder always up and connect to agent server, select keep connection alive. It will try to connect once disconnected.
Overall Agent Server, Listener and Forwarder securities are highly improved, areas include data encryption, data header and data validation.
It is a good news, Agent Server + Auto Trigger Forwarder can be run similarly as VPN Server. Auto triggered forwarder on Agent Server run with lesser memory. If 100 users login, only used 20M memory.
Support transfer rate balancing between application client and application server, better Agent Server memory management.
Sample Port Forward Definition:
0.0.0.0,2800-4000,128.1.1.88,3333,TCP
192.168.200.1,2800-4000,128.1.1.88,3333,TCP
192.168.200.1,2800-4000,128.1.1.88,2800-4000,TCP
192.168.200.1,2800-4000,128.1.1.88,3000-4200,TCP
Ip must be a single ip, no ranging or no subnet format. When Ip = 0.0.0.0, it includes all local computer ip, ie. 127.0.0.1,LOCALHOST.
Select suitable Network Adapter from Advanced Settings, then forward connection to agent server + auto forwarder or single agent forwarder.
What is Bind Non Local Computer IP ? Non Local Computer IP is the ip not set or not found in Local Computer,
ie. 222.12.34.56, 201.33.44.55, 192.168.10.111.
What is Bind ? Magic Router creates non local ip on the physical network adapter temporarily, then your application can connect to this ip, and make forward connection to agent server.
Bind Non Local Computer Ip and Auto Bind Port can be used for File Sharing, Proxy not supported ports and force redirecting outgoing ip to Agent Forwarder, redirect undefined ip, undefined port, relay on forwarder.
Magic Router Standard Routing support forward single port with encoding, firewall and quota for Proxy Server to access http,https protocol. But Agent Listener can forward multiple ports for non standard proxy protocol, such as 554 (radio broadcast). Additionally, You can start up Standard Routing and Agent Listener Client at the same interface.
If Bind Non Local Computer IP is enabled, Magic Router can also auto detect ip or port to bind. Settings in the text box is executed line by line, each line is in the following format.
single ip, ranged ip, ip subnet, single port, ranged port, combine ip and port.
samples:
222.12.34.56
123.12.34.10-100
111.12.34.0
80
136-139
12.34.56.78,136-139
What is the purpose of Auto Bind Port ?
If you want to redirect connection outgoing to non local computer ip, ip is not known or port is not known, then listener client will capture the connections according to the ip,port setting and forward to agent server.
Common usage: browser, online game or online radio.
Auto Bind Port can be used as proxy server. It can redirect all port, not only, 80,443,21. It can redirect all non standard proxy protocol. Once the port is binded, all outgoing to public ip connection will be handled by Agent Forwarder. That means you do not need a proxy server running on server side and do not need to set up proxy setting on browser.
This type of usage can be act as proxy for all port. Normally browser or proxy server is supported these port 21,80,443,Gopher,Socks ONLY. Auto Bind IP/Port supports all ports.
But this Auto Bind Port as proxy is for frequent accessed web site, like radio/video broadcast, http://www.google.com. If you always access different url, this setting is not applicable.
Limitation:
Auto Bind IP, Port is not committed immediately after detection, it require 5-10 seconds to complete. If the application/browser outgoing ip is changing all the time, it is not quite applicable.
Magic Router Listener Client supports FTP (client run as passive mode) relay/forward, protocol is FTP instead of TCP.
Sample Port Forward Definition:
127.0.0.1,2021,192.168.1.10,21,FTP
192.168.1.234,21,192.168.1.1,21,FTP
The above definition means Listener Client connect to Agent Server (or +Auto Forwarder enabled), then forward to Forwarder Client.
FTP client connect to local computer ip=127.0.0.1, port=2021 and final FTP server is on remote server ip=192.168.1.10, port=21. FTP client can be located in same LAN or WAN.
FTP client and FTP server cannot be the same computer.
Making use of Magic Router, you can enjoy faster file transfer rate between File Explorer and File Server. If run as System Service, suggest to enable Service Booster to boost file transfer rate.
Sample setting on Listener Client:
Port Forward Definition:
192.168.10.1,137,192.168.1.1,137,UDP
192.168.10.1,138,192.168.1.1,138,UDP
192.168.10.1,139,192.168.1.1,139,TCP
On Listener Client Advanced Settings, enable Bind Non Local Computer IP, select suitable network adapter.
Client common:
Server port = 2222, ip = YourDomain.com or Global Ip.
Where 192.168.10.1 (can be any non local address) is the ip address for File Explorer, and 192.168.1.1 is the ip address of true File Server. You cannot use 127.0.0.1 or local computer address (192.168.1.N) as the ip to connect by File Explorer. It will conflict with local computer file sharing.
If you use domain name as the Agent Server Ip, your laptop can connect to File Server both inside or outside the File Server network.
Why Magic Router for File Sharing ?
1. Improved Windows File Sharing Performance.
2. Faster database or text file transfer, at least 2 times faster.
3. set both send and recv buffer size to 64512 in client and agent server (+Auto Forwarder) or Forwarder Client, will increase file listing rate or file transfer rate.
4. Laptop through Magic Router connect to File Server, not like VPN, it will not affect laptop gateway or routing path.
5. Using domain name as Agent Server Ip , laptop can connect to file server inside or outside office.
6. Support open large (over 1G) MS Access mdb or very large foxpro dbf file (use command) over Internet.
7. Since File Explorer is connected to Magic Router Listener Client, always connected, network drive will not easily be broken.
8. Faster remote backup files from 1 computer to another computer.
limitation:
If Magic Router Listener Client is started for network drive mapping, File and Printer Sharing Service of local computer will be disabled.
Sample Screen:
VPN Simulated Network Diagram:
If the remote PC locate outside or inside LAN, use the following PFD instead. If outside LAN, start Agent Listener. If inside LAN, no need to start Magic Router, direct use LAN to connect LAN server.
Sample Port Forward Definition:
128.1.1.88,139,128.1.1.88,139,TCP
128.1.1.101,139,128.1.1.101,139,TCP
128.1.1.88,21,128.1.1.88,21,FTP
* Remember to enable Bind Non Local Ip, run Magic Router with Administrator right.
Forwarder can forward FTP that connect from Listener, but FTP client must start connecting with Passive Mode.
Forwarder Client can be automatically started on Agent Server. Auto Triggered Forwarder use much lesser memory than single Forwarder Client. Enable Auto Forwarder on Agent Server can simulate VPN Server usage.
The default setting for each new auto triggered forwarder is using the same setting as agent server config. If you want to change individual forwarder setting, select the user config and change it.
Allowed setting see "Forwarder Client Access Rules".
Trouble Shooting on Fail Starting up Auto Forwarder
1. If Agent Server and Auto Forwarder is enabled and listener (client side) cannot create tunnel after pressing start(2) button, start up another Magic Router on server side to configure the forwarder config file.
2. If Agent Server listen address is not 0.0.0.0 or 127.0.0.1, you need to configure the listen address from 127.0.0.1 to the address used in Agent Server.
3. If the listen port is not the port on Agent Server, change the port in client common to Agent Server listen port.
4. The listener user password must same as the password in User.txt or database.
Access Rule features are added on Advanced Settings:
1. Allowed ip,port,fromtime,totime to allow forwarder outgoing destination.
sample setting:
192.168.1.1-10,137-445,09:00:00,18:00:00
192.168.2.0,137-445,09:00:00,18:00:00
192.168.1.20,09:00:00,18:00:00
80,00:00:00,23:59:59
2. Enabled or not on Shell Cmd. Listener Client can issue command on forwarder. If you enable it, listener can do anything on forwarder computer.
3. Maximum connections allowed. Set to 0 for unlimited outgoing connections.
4. Blocked ip,port,fromtime,totime to block forwarder outgoing destination.
sample setting:
192.168.1.100,18:00:01,23:59:59
137-139,18:00:01,23:59:59
21,18:00:01,23:59:59
. Running as Administrator right.
. Supports Windows 2000/XP/Vista/Windows7/8/2008.
. No hardware requirement, Pentium II is enough.
Setup EXE
You can simply run setup exe to start installation.
Simple installation [from compressed file]
1. Create a directory suitable for installation. For example,
"c:\Program Files\MagicRouter\"
2. Extract the zip file into the directory. General files included, MR.EXE, MS.EXE, MM.EXE, MD.DAT, index.html and help.html, user.txt, DBCStore.mdb, WhiteIp.txt and BlackIp.txt.
Installing MR.EXE on different folders
If you want a better control on individual port, on firewall, on txt, errlog.txt, white ip, black ip, config.x.txt, you can create another folder to store all Magic Router files. Then change settings according to your need.
. Starting up MR.EXE, select config file first in panel controls > config combo, change settings accordingly.
. Click save button to save. Then install service or start service by System Service Combo.
. This instant of MR.EXE is not for system service, just for configuration, do not startup any button, exit to finish Windows service installation.
. If you need to config installed service, click MR.EXE, select wanted config file, change settings and save.
. If you need restart, click restart on service combo.
. If you want to apply changes without restart/disconnect created connection, do not use service combo, use remote management instead.
. Config by remote management, go to http://MyServer:Port/index.html. Change the settings, then click send button, all changed will be applied without restart/disconnect.
. If you need to restart, click send link accordingly. If no change in ip or port, no need to restart service.
Basic files are needed:
MR.EXE - Starting up Magic Router.
MM.EXE - Core file.
MD.DAT - Core data file.
Mswinsck.ocx - Core component file, need administrator right to register.
Additional file is needed according to different usage:
Running with remote management, index.html and help.html are needed.
Running as router mode = server and authentication is selected, user.txt is needed.
Running as agent server, user.txt is needed.
Running with firewall, DBCStore.mdb, WhiteIp.txt and BlackIp.txt are needed.
Running MS.EXE (Magic Starter, start up all MR.EXE), MS.txt is needed.
Run InstallActiveX.exe instead of Install.bat after version 1.0.0.
Mswinsck.ocx is for version 1.0.0, version after 1.0.0 is not needed.
You can put the following command line in MS.txt. If you click MS.exe, it will start up with all predefined configuration. If command line without full path, Magic Starter will run the MR.exe on the same folder.
C:\Program Files\MagicRouter\MR.EXE -lp=5901 -th=192.168.1.100 -tp=5955
MR.EXE -lp=5901 -th=192.168.1.100 -tp=5955
If your parameters are too many (over 255 char), use -cf para, like the following. And put all parameters inside config.1.txt file. By default Magic Router will save with default file format, config.x.txt, where x is s saved file sequence.
MR.EXE -cf=config.1.txt
MR.EXE -cf= config.Name.txt
It is very simple, just to delete the files added during installation. If installed as service, remove the service first by service combo before delete files. Magic Router makes registration info on registry only.
Why do we use txt, not using table. Txt file is convenient and no need to install driver. If you input over 1,000,000 of ip, as firewall black list, it is running much faster than using table.
BlackIp.txt or WhiteIp.txt, line by line, input to txt file. You can input subnet to include all ip.
203.85.222.33
203.85.0.0
222.125.88.0
User.txt, line by by, input user and pass. The first line is not used, is a column header.
UserName,Password
User,123889
MR.EXE - Magic Router, program start up file. If you start up not as ActiveX mode or System Service, MR.EXE must start first. Then it will release and load MM.EXE instead.
MM.EXE - Magic Router core, you cannot direct run this file.
MD.DAT - This is the data file of Magic Router core, missing will cause program unusable.
MSWINSCK.OCX - Windows Socket Active X Control, used for socket programming.
We can change MR.EXE or MM.EXE to this file format: MR80.EXE and MM80.EXE
where 80 is refer to a port number, or you can change to other number or text.
where 80 is also the middle part of config file name (config.80.txt).
and these 2 file name must start from MR*.EXE, and MM*.EXE.
Change file name used to identify this exe under process list. Since Magic Router is allowed to bind 1 port in standard routing, if you need to use magic router to bind to another port, you need to start up another instance. You must keep 1 MR.EXE and 1 MM.EXE under the same directory, otherwise software will not allow to start up.
MR.EXE can run from command prompt, direct start from file explorer or start up by other program.
INSTALL.BAT - If you cannot start Magic Router or ActiveX, login/run as administrator and click this file to install component. This file is special for ActiveX usage.
Use InstallActiveX.exe instead of INSTALL.BAT after version 1.0.0.
MS.EXE - Magic - Starter, start up a list of MR.EXE by this small starter with or without config file.
MS.TXT - List of command to start up all MR.EXE.
DBCSTORE.MDB - Database for firewall, quota and user list. If you enable firewall, quota or user authentication (server mode), DBCSTORE.MDB is a must.
INDEX.HTML - Remote Management Home Page, start from http://www.YourServer.com:ListenPort/INDEX.HTML
HELP.HTML - Remote Management Help Page, show all setting parameters, start from http://www.YourServer.com:ListenPort/HELP.HTML
config.txt - It is support multiple config file name. Save config.n.txt as your save config for a specific setting, where n can a port number or text string.
ie. config.80.txt, config.listener.txt
you must save config.txt to config.n.txt before you start Magic Router, otherwise config.n.txt will not be loaded.
You can select this config.n.txt file from Magic Router Control Panel. This file name will also be used in System Service.
ie. -cf=config.80.txt
To better manage your Magic Router Program, 1 folder to store 1 setting is preferred. Since under the same folder, all connection log, error log and data log are stored to the same file name. You cannot easy find out the information is come from which listen port.
Blackip.txt - Store all black ip. If firewall or quota enabled, ip will be blocked to access. You can use single ip or group ip, ie. 192.168.1.0, 222.125.0.0.
Whiteip.txt - Store all while ip. If firewall or quota enabled, ip will allow to access and bypass black ip checking.
ConnLog.txt - Log all connection request before firewall checking.
DataLog.txt - Log all data between client side application or server side, special for debug or protocol analysis.
ErrLog.txt - Log all error. If you find something strange in using Magic Router, see ErrLog.txt for hints.
README.TXT - Usage and Help. You can find more on our support center. http://www.magicrouter.net
User.txt - Store user name and password line by line. The first line is header, not used. If Magic Router is started as server mode and user authentication is enabled, this file is needed.
All config.*.txt - file are now stored in Config folder. Config file parameters see help.html for full reference.
Bin folder - is storing functions for compression, file sharing and raw packet viewer.
Mswinsck.ocx, Install.bat are applicable to version 1.0.0 ONLY.
Magic Router ActiveX is used for creating secure tunnel between client side and server side. If your client application need a secure tunnel, include hardware/user authentication, compression or encryption, use Magic Router ActiveX as your active control.
Take the following as a Magic Router Active X usage.
Take MySQL Database as example.
The Original MySQL listen port is 3306, you can change it to 3307 or keep using 3306.
Server side:
1. We go to set the listen port of MySQL Database from 3306 to 3307 in my.ini config file.
2. Start up Magic Router, in Coding page, select server router mode, select AES encryption and input AES password (this password must same as client side). If you need hardware (hardware info string as user name, 32 characters long) or user authentication, enable it.
3. Set listen port to 3306, forward port to 3307, to host as 192.168.1.1 (as local ip, use 127.0.0.1 is slower). Click Start button to listen.
Client side:
Version 1.0.0
1. Copy the following 5 files to client application folder.
INSTALL.BAT, MR.EXE, MM.EXE, MD.DAT, MSWINSCK.OCX
2 .Run INSTALL.BAT with Administrator right to install Magic Router Active X control. If you want to install active x by programming, you can issue this line to register: MM.EXE /regserver
Version 2.0.0
1. Copy the complete Magic Router folder to client application folder.
2 .Run InstallActiveX.exe with Administrator right to install Magic Router Active X control. If you want to install active x by programming, you can issue this line to register: MM.EXE /regserver
3. The following sample line is creating active control, for your application to start up listen socket and connect to Magic Router server side.
ooo = CreateObject("MagicRouter.ActiveX")
2. After create the active x object, start the following command to start and setup tunnel to Magic Router server side.
Version 1.0.0
ooo.Start(ListenPort, ServerIP, ForwardPort, UserName, UserPass, Coding, AesKey, ShiftByte)
where ListenPort is number, the port of local user machine
ServerIP is String, ip of the application server
ForwardPort is number, listen port of application server
UserName is string, max 32 characters, leave empty if not using authentication
UserPass is string, max 32 characters
Coding from 0 to 4, see parameter for more help
AesKey is string, max 32 characters
ShiftByte is number, from 1 to 254
ie. ooo.Start(3306, "192.168.1.1", 3306, "AlfeeKwok", "12345678", 2, "ServerAESPasswrod", 0)
Version 2.0.0 (ssl3 parameter is added)
ooo.Start(InListenPort, InServerIP, InForwardPort, InUserName, InUserPass, InCoding, InAesKey, InShiftByte, InSSLCmd)
InCoding = 5 as SSL3
leave InSSLCmd to empty as default SSL3 command, you can change to different exe name or different config file name
ie. \stunnel\stunnelx.exe stunnelx.conf
4. Magic Router Active X is started, you can find a MM.EXE is running under process list. But sometimes if the listen port is already used by another application, Magic Router Active X may not start up correctly. Then see ErrLog.txt for detail.
5. You can create more object to start up another listen port for your application at the same time.
ie. ooo2.Start(1433, "192.168.1.1", 1433, "AlfeeKwok", "12345678", 2, "ServerAESPasswrod", 0), open a socket locally on client machine, to connect to final MS Database server.
6. Start method of Magic Router Active X object is allow run once, if run more than 1, Magic Router Active X Server may not shutdown correctly. It does not matter, keep running will not harm system.
7. OK now, everything is already, you can issue your connection to local machine port instead of connect to server port.
this is visual foxpro sample, connect to local user machine.
cn = sqlstring("DRIVER=MySQL ODBC 3.51 Driver;DATABASE=test;SERVER=127.0.0.1;UID=root;PASSWORD=rtyufghn;PORT=3306;OPTION=2051;STMT=;")
8. It is not necessary to release the active x control, most programming language will clear all resources while shut down.
9. Overview: The above active x programming is used to simulate a server listen port, create a listen port on local user machine. Most secure connection is connected locally instead of connect to remote server ip/port directly. Then all sending out data can be encrypted before going out.
If install Magic Router as service, remember to set port for monitor, for remote management. Otherwise you cannot change setting while Magic Router is running.
1. To startup Magic Router without login while computer is starting up, install Magic Router as system service.
2. If you find start up Magic Router with problem while user login to system (by start up group, not system service). If computer is not fully loaded all resource, Magic Router will not start up correctly.
If you get this problem, install Magic Router as system service. Magic Router have the ability to provide exe none stopped control.
3. If you need to config or restart Magic Router, you just only start up any MR.EXE under the folder of the exe, select a config.n.txt file, change setting as your need, click save, and restart service.
4. To avoid Magic Router crash, there is no tray icon on system tray, click any MR*.exe can config you Magic Router setting.
5. 1 standard routing listen port will create 1 system service on windows service list. 1 instant of Listener Client or Forwarder Client need 1 system service. 1 agent server needs 1 system service. Whatever you start up as system service, different config file name with this format config.x.txt can install as service. But remember to set different listen port on different service.
6. Why don't start up all listen port on a single MR.EXE. Even our Magic Router support multi-thread, running all ports on an exe is facing high risk. If either server data crashing exe, all serviced ports will crash at the same time.
7. To better control you error log, data log, connection log, config file or data file, run single port on a MR.EXE in different folder. The config.?.txt file in different folder cannot be the same name, since this config file name will be registered in system service. Same file name cannot register in system service, it is system limitation.
How to config.
Start up any MR*.exe, select the config file used by system service. Generally, we use config name as this format, config.port.txt, where port is the listen port of the service. Whichever standard routing, agent server or listener, there must be a port to listen. If start up only as forwarder, you can name the config as config.user1.txt. But config.user1.txt must rename by yourself, Magic Router will not increase the sequence automatically.
Select config file of the running instant, start you changes. Changes will not apply to running service.
How to apply changes
By remote management, http://YourServerIp:Port/index.html
How to view information/status
If MR.EXE is run under windows service, you can view information or status by http client, IE or Firefox by this address http://MyServer:Port/index.html
You can view connections, restart service and change setting.
If over 6 instants of Magic Router under Windows Service, the 7th start up will fail, due to out of memory.
If you need to run over 6 Magic Router, you need to login system. As user login, system is allowed more memory to access application. Windows XP or earlier os version will get this out of memory problem, Windows 7 will allow more memory, but still get out of memory error.
You can rename MR.EXE to another file name, but file name cannot more than 10 characters>
Magic Router will assign a new file name, ie. from MR.EXE TO MR3306.EXE, where 3306 is the number extracted from config.3306.txt. Too long file name under Windows NT or 2000 will get problem.
To make everything run correctly, you need to test setting, run as normal user before install as service.
Out of memory symptom under System Service is cleared from version 2.0.0. You can install over 100 Magic Router as System Service, but depends on what O/S or memory installed.
system.pid file is used to record Magic Router running status under system service. Do not change or delete it, let system to handle.
1. Start(0) button, starting up standard routing. If network or coding page values changed, need to stop and start again.
2. Conns button, show standard routing connections.
3. Block IP button, block standard routing ip. If blocked, this ip will become black ip, stored in memory, txt or table.
4. Drop button, drop selected connection. If drop, the tunnel is disconnected, but will not block the ip.
5. Sort combo, sort standard routing connections.
6. Config combo, if you need to reuse values in future, select config file first before input value.
7. Save button, save current values to selected config file. Config file fomat is config.n.txt, where n start from any number.
- Save setting to config file, no need to setup parameters every time.
- No registry access is made, all settings found in config.txt only. You can start MS.exe to start up all MR.EXE for different port or setting.
8. Service combo, select config file first, save changed settings. Whatever you save or not, you need to select config file first, let service combo point to correct setting. Then install, start, stop or uninstall.
See Remote Management.
This is the simplest and the only supported command. If you need more complicated features to enable, see parameters from help.
The following will not start monitor and do not show user interface, run standard routing only
MR 5901 192.168.1.100 5955
The following command with standard parameters, you can add more as your need.
This command will start Start(0) button and monitor,
MR -lp=5901 -th=192.168.1.100 -tp=5955
-sc=0 normal routing
-sc=0,1 normal routing then agent server start up.
-sc=0,1,2,3,4 normal routing, agent server, listener, forwarder, then monitor start up.
-sc=3 forwarder start up ONLY.
Should start up by ordering, ie. cannot start 2,1,0,3 1,0.
If not specify, and run from Magic Starter, or command line, start up normal routing ONLY.
You will receive a full version executable files and registration info by email after payment. Then extract your file anywhere on your computer. No installation is needed, direct open mr.exe, go to About page, input Product ID, UserName and Serial Key within 5 minutes. You will grant 39 installations on different computer with the same registration.
After input, you may keep program running or shutdown and start up again. If your program running not properly or no response or do nothing you expected, you may input the incorrect registration info, go to About page and re-input.
If your hardware is changed, software re-activation is needed, ensure your computer is allowed to access http://activate0.magicrouter.net, port = 80.
Try to access http://activate0.magicrouter.net to test connection.
There are 10 url listen for activation, from http://activate0.magicrouter.net to http://activate9.magicrouter.net.
If you get new release version, you need to start mr.exe to reactivate your registered copy, otherwise it will not run properly under system service.
The following sharewares will be discussed how to use with Magic Router.
1. Proxy.exe, run command line to start proxy, it is very simple. Application Sample will tell you more about proxy usage.
2. Slimftpd.exe, it is very slim.
3. Vnc, it is free for non business.
4. MySql, MSSQL, Oracle database. Protect your database by Magic Router firewall.
5. SMTP, POP3, protect from DOS attack, spam mail.
Magic Router is a very straightforward program, but its features are very powerful. You may not be able to 1 day fully understand.
Step by Step to be an expert, by the following usage order.
Lesson 1:
1. Network > Standard Routing
2. Remote Management, by http://ServerIp:Port
3. Coding > Router Mode, as alone, as client, as server
4. Coding > Encryption and Authentication
5. Firewall > Basic
6. Firewall > Advanced with different options
7. Quota
8. Misc., try Misc, then Notification
9. Tools > Log Data, for protocol analysis
Lesson 2:
1. Agent > Listener > Forwarder, to make reverse connections between 2 computers.
Lesson 3:
1. About, please remember to pay to support us. After payment we will send you a registered account and serial number.
You can either start Lesson 1 or Lesson 2, since these 2 routing method are independent.
Magic Router can be used as protocol data analysis, view what kind of data between client and server.
Log data of http, smtp, pop3, ftp, Dns, MySql and any kind of server service.
The following is a sample to analyze Mysql odbc client and server database .
1. set the listen port to 3306, forward to 3307 and ip of the mysql database server.
2. Click Start button as standard routing mode.
3. Go to tools page, log data, select 1-5 minutes, click start button to record the data stream between client and server.
4. Start your client application using mysql odbc driver, connect to port 3306.
5. See the Datalog.txt file, there is data recorded from client or server.
Comment: Sometimes we will use log data to analyze what signal send from http client (IE, Firefox) to http server.
Agent Forwarder, as a remote control, i.e. restart service, restart computer, do anything. No port is needed to open, create tunnel by connect to outside agent server.
Type command in Agent > Shell Cmd on Forwarder
1. Restart service by:
NET STOP "Windows Time"
NET START "Windows Time"
NET STOP "VNC Server"
NET START "VNC Server"
2. Kill process if not responded but not down, and restart program by:
TASKLIST
TASKKIL
TASKKILL /F /PID 836
If both administrator side and remote computer side have no public ip, use reverse connection to connect (remote side) vnc server.
Remote side:
1. Install Tight vnc on remote computer.
2. Before connection, you need to setup vnc server allow local loopback connection.
3. Tight VNC is support file transfer, no need to use samba, ftp or file sharing.
4. Start vnc as server mode, finish setup password and listen port.
5. Start up Magic Router, run as forwarder client, input agent server port and server ip, input username and password. Click start(3) to listen to finish setting.
Administrator side:
1. Start up Magic Router as listener client.
2. Input agent server port and server ip, input username and password.
3. Input Port Forward Definition
0.0.0.0,5500,127.0.0.1,5500,TCP
4. Click start(3) to listen to finish setting.
Run vnc viewer, input 127.0.0.1:5900, then vnc viewer will connect to remote side vnc server.
If remote side have more than 1 computer installed with vnc server, and you don't want create too may port forward on hardware router, you can define more than 1 listen port, to connect to different computer.
Port forward definition on listener side sample:
0.0.0.0,5500,127.0.0.1,5500,TCP
0.0.0.0,5501,192.168.1.1,5500,TCP
0.0.0.0,5502,192.168.1.2,5500,TCP
0.0.0.0,5503,192.168.1.3,5500,TCP
0.0.0.0,5504,192.168.1.4,5500,TCP
If you find vnc is not fast enough to control remote side computer, you can use mstsc (terminal server client) to connect to terminal server instead of VNC server
VNC Server is unstable, you can additionally startup Magic Router as Forwarder. Install Forwarder client as Windows service. If vnc server is not running properly, shut down and restart by Listener client > Shell cmd on forwarder.
If your hardware router is not fast enough, and there are a lots of port forward needed, you should use Magic Router instead of hardware router. Computer CPU is much faster then router.
Client encrypt + agent listener + agent server + agent forwarder + server decrypt
Take remote desktop as an example.
A. admin side:
1. network:
listen port = 5389, to port = 4389, to host = 127.0.0.1
2. coding :
select client, select encryption compress + AES
3. click start(0) standard routing
4. agent:
a. port forward definitions: 0.0.0.0,4389,127.0.0.1,4389,TCP
b. client common: s port = 2222, ip = 59.148.187.182 (agent server ip)
c. click start(2) button
d. click apply changes, for port forward definitions
B. control side:
1. network:
listen port = 4389, to port = 3389, to host = 127.0.0.1 (or another remote network computer ip)
2. coding :
select server, select encryption compress + AES
3. click start(0) standard routing
4. agent:
a. client common: s port = 2222, ip = 59.148.187.182 (or 127.0.0.1 if agent server is running on same control pc)
b. click start(3) button
Issue mstsc (terminal service client), type in 127.0.0.1:5389
If you issue command on your computer, ip always using 127.0.0.1. If access from another computer to your admin computer, type LAN ip of your computer.
Performance, compare normal connection with secure reversion connection
If connected, cpu usage is very slow. If click admin side connections button, you will find that remote desktop is using very less bandwidth. Compare with connecting remote pc by mstsc without Magic Router, the speed is almost the same.
Actually, remote desktop connection is encrypted, you do not need to make double encryption. This secure reverse connection sample is a theory.
If found error connection, try the following step by step.
1. Made connection simple first.
2. Test agent setup without encryption, without start up standard routing.
3. Test no agent, with coding client and server mode with encryption.
I have started up Agent Forwarder on all servers with different user account, which account you login, which server to remote control.
If you startup agent server with ip:127.0.0.1, start forwarder and start listener at the same Magic Router. A Agent Tunnel is created. You can fire command mstsc, input 127.0.0.1:3333, where 3333 listen port is defined in Listener Client > Port Forward Definitions, ie. 0.0.0.0,3333,127.0.0.1,3389,TCP
Especially debug a computer that infected with virus, or update some dll that is locked by system in Normal State.
All functions are fully workable under Safe Mode with Networking.
Magic Router can be used as remote controller. Since some software is unstable, sometimes they works un-responded. You can send command by "Shell Cmd on Forward" to restart services.
Magic Router can be used as simple file transfer, By Tools > Shell Cmd on Forwarder. Using PUT or GET command to transfer file.
Magic Router is fully support routing Samba. By setting up port forward definition, on listen side of a non samba (or samba disabled) installed pc. Tested on XP and 2003, fully support if 4 ports are opened.
Before setup, you need to disable samba and some port on listener side computer.
See How to disable NetBIOS over TCP/IP
See How to disable port 445
Steps to start up routing, share network B server file from network A computer.
1. Start up listener client (computer 1 network A), connect to agent server. Input the following port forward definition. Where 192.168.1.88 is the ip of share file server.
0.0.0.0,137,192.168.1.88,137,UDP
0.0.0.0,138,192.168.1.88,138,UDP
0.0.0.0,139,192.168.1.88,139,TCP
0.0.0.0,445,192.168.1.88,445,TCP
Where 192.168.1.88 is the ip of computer 2 network B.
2. Start up forwarder client in (computer 2) network B server, connect agent server with same user name and password to finish setup.
3. Start map drive on computer 3 in network A, ip is the ip of computer 1. You cannot test map on computer 1, since \Device\ and NetBIOS is disabled.
None service can 100% guarantee no down time, if Hardware VPN down, you can make use of Magic Router as your alternative method to create VPN. Access shared folder/files from remote computer, use Agent Listener is much more easy than open four ports(137,UDP; 138,UDP; 139,TCP; 445,TCP) by 4 Instant of Magic Router.
If either listener side network or forwarder side network have public ip for Agent Server set up, suggested to use your own Agent Server. Create your own agent server is 100% bandwidth guaranteed.
In Windows 2000/XP you have the ability to disable NetBIOS over TCP/IP.
1. You do this by right-clicking on My Network Places and selecting Properties.
2. Then right-click on the appropriate Local Area Connection icon, and select Properties.
3. Next, click on Internet Protocol (TCP/IP) and Properties.
4. Now click Advanced, and select the WINS tab.
5. There you can disable NetBIOS over TCP/IP.
The changes take effect immediately without rebooting the system.
You can easily disable port 445 on your computer. To do so follow these instructions:
1. Open regedit and go to: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NetBT\Parameters
2. Under that key locate the entry named TransportBindName.
3. Double click the TransportBindName entry and then delete it's default value, thus giving it a blank value.
4. Reboot for change to take effect.
5. After rebooting open a command prompt and run netstat -an to verify that your computer is no longer listening on port 445.
1. Start listener on network A to connect to agent server.
2. Start forwarder on network B to connect to agent server.
3. Go to tools page, find Shell Cmd on Forwarder.
4. Type NET USE (if u not sure the drive is mapped on remote computer.)
5. Type NET USE X: /DELETE /Y (if u need to dismount the drive)
6. Type NET USE X: \\192.168.2.111\temp$ 12345abzx /USER:Administrator (map a drive to remote computer)
7. Type DIR X: (see what folder can be access)
8. Locate the folder or file, press Ctrl+C to copy the line in Magic Router display box, extract the file name for typing command.
9. Type GET x:\test.txt
10. test.txt will then download to root of Magic Router.
If you want to upload a file from admin pc to a pc inside forwarder network.
1. Type PUT c:\temp\config.txt (file is on admin side)
2. Type COPY config.txt x:\temp\config.txt (confiG.txt is uploaded on remote side)
Pay some attention:
If forwarder run under system service, NET USE to map drive is not workable. Since under system service, the session user is using SYSTEM. Most commands under system are not workable. Therefore we always start forwarder under normal user session.
By creating secure tunnel, the data between client and server will be safe.
take mysql client and server as an example.
1. Copy Magic Router program on both client and server.
2. Start Magic Router on client side, set listen port = 3306, forward port = 3306, and enter the mysql server ip.
3. Select protocol = TCP.
4. Go to coding page, select router mode as client, select AES encryption. If you need to change AES Key, both client and server side should be the same key.
5. Click start(0).
6. Start Magic Router on server side, set listen port = 3306, forward port = 3307, ip = 127.0.0.1. Where 3307 is Mysql server listen port, you can change it on my.ini under windows directory.
7. Select protocol = TCP.
8. Go to coding page, select router mode as server, select AES encryption. if you need to change AES Key, both client and server side should be the same key.
9. click start(0) to finish settings.
The tunnel is created, then you need to config your application client. The mysql odbc driver should point to 127.0.0.1:3306. If point to localhost or true ip of the client, there will be security hold, hacker can sniff your data.
Start you client application, do what u want. Your will find everything is no change, but the data is safely transferred.
There is an ActiveX version to use Magic Router as SSH like tunnel client, see ActiveX for more.
Start Magic Routers as client and server mode with compression. Not all data of all protocol/server can be compressed. If data is already encrypted, compress is useless.
You can use Single ip and single port as a multi service port. For instance, you can open port 80 as standard http server as default service, and at the same time enable header forward. If first data header arrives from client, it can forward to another port like 1433(MSSQL), or 2222(Agent server). No need to open port 80 on ip of computer 1 for http, and port 80 on ip of computer 2 for Agent server (or MSSQL, or other server). That means 1 port is serving 2 server services or more. Using header forward from 80 to 2222, is to bypass firewall detection. Most network firewall is allowed out going to http server (port 80), but not allow other ports. We opened a port 80 to let your listener/forwarder to connect to our Agent server.
You can start up an Agent Server on a server with public ip, let other user to connect in. If listener and forwarder both connected, a private tunnel is created for transfer data between 2 networks without public ip. We allow you to sell agent server accounts, it is not limited by license or agreement. But you cannot share you Magic Router copy to other people. Each copy is allowed limit installation, and limit by agreement and terms of condition.
Start standard routing and coding as client with encryption on listen side (or forward), start standard routing and coding as server with encryption on forward side (or listen). If higher security is needed, select AES with password instead of compression, compression is for faster connection.
If you find agent server is not safe, afraid of hacker attack, start up with Magic Router firewall or quota with the following settings.
Normally, we use port 2222 as for Agent Server, but you can change.
1. Network: Listen port = 2222, to port = 2223, to host = 127.0.0.1, click Start(0) button.
2. Firewall: click enabled to support firewall, then set the max connection per ip. Max connection and hit according to your business activity.
3. If advanced setting is needed, change it. If you select black ip option, it will protect from ip of the hacker detected.
4. Agent: local port = 2223.
5. Click start(1) to start Agent Server with Firewall.
6. Click start(0) button to start standard routing, Start(0) and Start(1) are start up order independent.
You can start up the following features at the same time on single Magic Router start up.
1. Standard routing with header forward + auto switch + qos + remote management,
2. Coding with different router mode + encryption + authentication.
3. All firewall settings, all quota settings and enable misc. settings.
4. Standard routing listen port point to listener client listen port in port forward definitions.
5. Start agent server, listener client and forwarder client with correct settings. The last forward is done by forwarder client, forward to last true application server ip:port.
1. Starting listener client and forwarder client in administrator side.
2. Starting listener client and forwarder client in remote side.
3. Then issue PUT winvnc.exe command by Tools > “Shell Cmd on Forwarder” in listener side.
4. To upload the winvnc.exe, try the following commands.
type PUT D:\TEMP\WinVNC.exe
type PUT D:\TEMP\VNCHooks.dll
type WinVNC.exe
type WinVNC.exe -connect 127.0.0.1:5500
5. If you send magic router program with vnc required files to remote side, no need to issue PUT command.
Why do we start up passive mode on remote side ?
Administrator can install passive mode vnc himself, all can be done without remote user action. And it is not easy to ask user to install normal vnc mode, hard to setup password and port to bypass firewall. To minimize remote user action, you need to setup correct config.txt and send all Magic Router required file. What remote user needs to do is ask him to click MS.EXE, Magic Starter. Before send files, all listener client and forwarder client settings should set in config.txt.
Admin side Config sample:
-sc=2,3 -sp=2222 -si=0.0.0.0 -sd= -sq=2222 -sj=203.66.123.247 -su=User1 -sw=12345 -sx=User2 -sy=12345 -sa=1
Remote side Config sample:
-sc=2,3 -sp=2222 -si=0.0.0.0 -sd=0.0.0.0,5500,127.0.0.1,5500,TCP -sq=2222 -sj=203.66.123.247 -su=User2 -sw=12345 -sx=User1 -sy=12345 -sa=1
By Running Remote Desktop with limited user right on same computer, your computer will become very safe and no need to install antivirus program or any defensor program. Since limited user login is not allowed to install any program, destroy system or virus attack.
Steps to run:
1. Create a limited user on your computer.
2. Go to system, click remote desktop page, add the limited user to access list.
3. Start up Magic Router, and set listen port = 3388, to host = 127.0.0.1, to port = 3389, press start(0).
4. A remote desktop login screen is coming, then input the user name and password. If no password created, remote desktop is not allowed you to login.
Therefore, we do not need to surf Internet in virtual machine or other very protected computer.
We get the following small problem, a little bit delay to final server.
Using mstsc 127.0.0.1:3388 > Connecting listener > agent server > forwarder > standard routing > final terminal service with port = 3389, get several seconds delay to terminal server.
But if you connect to another server like mysql or http, delay problem disappeared.
Finally, we found what problem it is. Using local ip 127.0.0.1 will delay network connection. Therefore to make connection fast, do not bind to ip 127.0.0.1 (LOCALHOST) or point to 127.0.0.1. It is much better to use ip like 192.168.1.X.
Listener client is support multiple listen port, you can setup more than 1 listen port, forward to final server.
Port forward definition for samba
0.0.0.0,137,192.168.1.88,137,UDP
0.0.0.0,138,192.168.1.88,138,UDP
0.0.0.0,139,192.168.1.88,139,TCP
0.0.0.0,445,192.168.1.88,445,TCP
Port forward definition for Netsentinel (Parallel port key authentication).
The following definition can share/mirror network A server to network B.
0.0.0.0,2050,192.168.1.245,2050,UDP
0.0.0.0,2051,192.168.1.245,2051,TCP
If use standard routing, you need to start up 2 Magic Router.
Routing1 on network A:
2050 to 2050,203.88.240.222,UDP
Routing2 on network A:
2051 to 2051,203.88.240.222,TCP
Routing3 on network B:
2050 to 2050,192.168.1.245,UDP
Routing4 on network B:
2051 to 2051,192.168.1.245,TCP
Where 203.88.240.222 is public ip of network B
But use 2 Magic Router, you can setup qos, firewall, quota and more that agent forward client can’t.
If you have many http servers with many domains, you can setup Header forward with auto switch. The purpose of using auto switch is to provide a load balancing control. If main http server has no response or late response (ie. 5 seconds), http request will forward to defined spare server. Such auto switch will
The following example will show the setting of 2 domains with 4 servers.
Magic Router ip: 192.168.1.1, public ip is 59.148.187.182
Domain 1: www.magicrouter.net, main server ip: 192.168.1.2, spare server ip: 192.168.1.3
Domain 2: www.my8z.com, main server ip: 192.168.1.4, spare server ip: 192.168.1.5
Steps and setting
1. Startup Magic Router as main router for header forward.
a) If header found www.magicrouter.net, forward to 192.168.1.2
b) If header found www.my8z.com, forward to 192.168.1.4
2. Standard routing listen port is 80, to port = 80, to host = 192.168.1.2, as the default http if header not match.
3. Enabled header forward, and input the following definition
www.magicrouter.net, 127.0.0.1,81
www.my8z.com, 127.0.0.1,82
4. Start up 2nd Magic Router on same computer as main Magic Router.
5. Listen port = 81, to port = 80, to host = 192.168.1.2.
6. Set up auto switch: Enabled, input spare server definition: 192.168.1.3,80
7. Start up 3rd Magic Router on same computer as main Magic Router.
8. Listen port = 82, to port = 80, to host = 192.168.1.4.
9. Set up auto switch: Enabled, input spare server definition: 192.168.1.5,80
After settings, you have 4 servers to service http, and 3 Magic Routers in main server to control http service.
If your http support header detection (domain), no header forward is required, put all spare server on 1st Magic Router.
Spare server definition:
192.168.1.2,80
192.168.1.3,80
192.168.1.4,80
192.168.1.5,80
It is a very common problem, hacker most likely attack http server. Since web server is a common service, and easy to be DOS(Denial of Service) by hacker. To protect Apache or IIS server by Magic Router - firewall/quota on Port 80, will highly decrease the attack rate from hacker. Our web server is installed with Magic Router - firewall/quota on Port 80. One day we found that our web server was very busy, and go to tools > Log Data > 1 minute, to see what data signal was coming in and going out. A spider server was continuously downloading our zip files, causing the bandwidth highly used, and making server very busy, then apply Magic Router - firewall/quota. Finally an ip was detected and blocked, server busy problem fixed.
It is a typical issue, sometimes we need to issue command remotely on server. By using the same instant magic router, start magic router as agent server and as agent forwarder. Or install magic router as system service with agent server and agent forwarder configuration. After configuration and installation, then start magic router as agent listener on remote computer. Issue command by Tools > Shell Cmd on Forwarder.
Sample command:
Restart server if you do nothing by VNC or Remote Desktop, cannot connect:
shutdown.exe /r /f /t 5
Lock works station / server, this command is force to lock out server, if terminal server is not correctly allowed you to connect.
rundll32.exe user32.dll, LockWorkStation
Why do we use secure tunnel + proxy.server ? When your http connection request is filtered or rejected by telcom router, or they block your access to some http server. Using Magic Router for secure tunnel + proxy server
will bypass internet router content detection.
The following example is true in Indian, Asia. When you access facebook, it is rejected.
1. Assume you are (called A) in Asia, and not allow to access some servers in USA.
2. You have a server (called B) that can connect outside Asia, and this server is allowed to connect to USA.
3. By setting up secure tunnel + proxy, you can access USA from A side. Of course, you can VNC from A to B, then start browser in B to access USA server, but it is very very slow.
Steps to setup secure tunnel + proxy server:
1. change your internet browser setting. Find setting for proxy. Manual input http proxy ip = 127.0.0.1, port = 4480
2. Setup a Magic Router in A. Listen port = 4480, to port = 80, to host = ip of B server. Since 80 can bypass most firewall, you can change to other if 80 is not available.
3. Select protocol = TCP.
4. Go to coding page in Magic Router, select router mode = client, encryption = Shift Byes. If connection is still rejected, try another encryption.
5. No firewall or quota needed, since only you access.
6. Click start(0) button to start listening on A side.
7. Setup a Magic Router in B. Listen port = 80, to port = 3888, to host = 127.0.0.1 (if http proxy server is installed on the same pc). Since 80 can bypass most firewall, you can change to other if 80 is not available.
8. Select protocol = TCP.
9. Go to coding page in Magic Router, select router mode = server, encryption = Shift Byes. If connection is still rejected, try another encryption.
10. You can setup firewall or quota if necessary. Since this server B is opened for public.
11. Click start(0) button to start listening on B side.
12. You can start access facebook now... good luck !
Make use of existing VPN connection:
A little bit change is needed to enjoy faster connection. If there is a VPN connection between site B and C (static routing is added, so as to talk between B and C), simply change the "to host ip" of Magic Router in B to site C server ip is OK.
It is very hard to apply Magic Router to FTP. Plesae see the following notes from internet.
From our testing:
It is not possible to forward ftp, ftp client will check the ip in return data string from ftp server. FTP is not truly talk by connected ip:port, not like smtp, pop3 or http.
From Internet, concerning ftp connection:
FTP operates on the application layer of the OSI model, and is used to transfer files using TCP/IP.[3] In order to do this a FTP server needs to be running and waiting for incoming requests.[3] The client computer is then able to communicate with the server on port 21.[3][6] This connection, called the control connection,[7] remains open for the duration of the session, with a second connection, called the data connection,[2][7] either opened by the server from its port 20 to a negotiated client port (active mode) or opened by the client from an arbitrary port to a negotiated server port (passive mode) as required to transfer file data.[2][6] The control connection is used for session administration (i.e., commands, identification, passwords)[8] exchanged between the client and server using a telnet-like protocol. For example "RETR filename" would transfer the specified file from the server to the client. Due to this two-port structure, FTP is considered an out-of-band, as opposed to an in-band protocol such as HTTP.[8]
We cannot easy setup port forward for ftp server, but we can protect ftp from being attack by using Magic Router Firewall and Quota, FTP server is using port 21, it is common and will not change. Hacker like to attack or find something useful. Some FTP may not able to protect attack from DOS, if hacker continuous send connection signal to your ftp server, ftp max connection will reach, causing ftp lock, none will allow to access.
Setup:
1. Change your ftp server port from 21 to 2021 (or other port not used).
2. Start Magic Router, set listen port = 21, to port = 2021, to host = 192.168.1.1 (your server ip, do not use 127.0.0.1, slower).
3. Enable firewall and quota in Magic Router, set the hit rate, quota limit according to your business.
4. Save setting or Start Magic Router.
The case is we cannot send email from user@domain.com to user@domain.com. This domain.com is not allowed to make self test email in Hong Kong. Therefore we find out a server located outside Hong Kong office. Actually site B is China.
We use Forwarder in site B, it is because site B server do not have a global/public ip, we need to use agent listener + agent forwarder to make connection.
A. Start Listener on site A computer
1. Go to Agent page, input the Port Forward Definitions: 0.0.0.0,25,gzsmtp.xmail.com,25,TCP
2. Input user name = 123456789012, password = 789123 (change according to your registration info)
3. Input S Port = 80, IP = www.magicrouter.net in Client Common (change if you have your own IP and Agent Server started)
4. Click Start(2) button.
B. Start Forwarder on site B computer.
1. Go to Agent page, input user name = 123456789012, password = 789123 (change according to your registration info)
2. Input S Port = 80, IP = www.magicrouter.net in Client Common (change if you have your own IP and Agent Server started)
3. Click Start(3) button.
Start send email through site A computer with port = 25.
Sometimes we want to know what information or data is being sent out to outside server. We can change the network dns setting is enough to capture domains.
Start Magic Router, input listen port = 53, to port = 53, protocol = UDP, to host = 210.184.16.65 (your original dns ip) .
Click Start(0) button.
Go to Tools > Log Data > 5 minutes, click start button.
Go to Windows Control Panel > Set Network > TCP/IP > DNS to 127.0.0.1.
Restart System Service > DNS Client.
See DataLog.txt after some moments. You will find some domains in the DataLog.txt file. Some from virus program, some from adv program, some from Microsoft, some from some shareware program.....
Of course, you can install some sniffing program to capture what data is going out. But it is too much, the focus here is to capture what domain.
It is a true case in Hong Kong. Our broadband provider and email provider (in China) not allow us to send self email, ie alfee@sina.net is not allowed to send to alfee@sina.net. But when my laptop used in China and send email, this test is allowed.
To fix this problem, we set up a flexible routing, to bypass provider detection.
Hong Kong Side Settings:
1. Start up Magic Router in Hong Kong server, go to Network page.
. listen port = 25
. To port = 2025, to host = 192.168.1.10 (same computer).
2. Click Advanced button next to "To Host", enable auto switch, input spare server definition
. 192.168.1.10,2026
. Why we use spare server at the same time, because of backup. Once 2025 is down, 2026 will take place.
. Press Start(0) button.
3. Set up listener client on the same Magic Router
. Go to Agent page, in put the following setting
. Port forward definition: 0.0.0.0,2025,gzsmtp.sina.net,25,TCP
. 2025 is for 25 port routing, final server is gzsmtp.sina.net:25
. Input user name USER1 and password on listener client
. Input server port = 2222, ip = 222.125.44.88 in client common, where 222.125.44.88 is the ip of forwarder located in China office.
. Press Start(2) button.
4. Set up spare server in case of first China Forwarder down.
. Start up another Magic Router in the same server, go to agent page,
. Input port forward definition as: 0.0.0.0,2026,gzsmtp.sina.net,25,TCP
. Input user name USER2 and password on listener client
. Input server port = 2222, ip = 192.168.1.20 in client common, where 192.168.1.20 is the ip of agent server located in Hong Kong office.
. Press Start(2) button.
China Side 1 Settings:
1. Start up Magic Router in the China server, go to agent page.
. Input local port = 2222 in agent server.
. Press Start(1) button.
. Start up forwarder on the same Magic Router,
. Input user name USER1 and password on forwarder client.
. Input server port = 2222, ip = 192.168.2.10 in client common, where 192.168.2.10 is the ip of the same computer.
. Press Start(3) button.
China Side 2 Settings:
1. Start up Magic Router in the China server 2, go to agent page.
. Start up forwarder,
. Input user name USER2 and password on forwarder client
. Input server port = 2222, ip = 203.85.210.22 in client common, where 203.85.210.22 is the public ip of the Hong Kong Agent Server computer.
. Press Start(3) button.
We have used 2 Agent Server in the above setting. 1 is in China, 1 is in Hong Kong office. Use of the second agent server is because of no public ip of second forwarder in China.
The above connection is not only for "self" email sending, but for normal SMTP routing. 192.168.1.10:25 is not only accepting local office email, but simulate a China side server. Broadband or email provider do not know what we are doing. Therefore they cannot detect our email routing.
I am stupid in the past, try very hard to configure hardware router, made many port forward every time, and waste of time, and sometimes rejected by office network administrator. Therefore I use Magic Router to make forward instead.
Agent Listener, Port Forward Definitions:
0.0.0.0,3388,128.1.1.50,3389,TCP
0.0.0.0,5901,128.1.1.100,5900,TCP
0.0.0.0,5902,128.1.1.101,5900,TCP
0.0.0.0,5902,128.1.1.101,5900,TCP
0.0.0.0,3306,128.1.1.2,3306,TCP
where 128.1.1.0 is the internal network of remote office, you can do everything by these Port Forward Definitions.
Save your config after defined.
Ftp is using several data connections (open 1 static port and 1 dynamic) to transfer file. If outside user want to connect to this ftp server inside LAN and hardware router is not allowed to change, he will never reach the server. Even you want to use reverse connection (or Magic Router reverse connection), you will not success. There is a simple way to retrieve files from remote office > computer inside LAN with firewall.
The answer is use SFTP instead of FTP, SFTP use single connection only.
1. Download free sftp client(install on office A computer) and sftp server(install on office B server/computer). We use Core FTP client and Core FTP mini sftp server.
2. Issue Magic Router Listener connection to a Magic Router Agent Server inside office A computer, setup proper config to port forward definition in Magic Router Agent Listener.
3. Issue Magic Router Forwarder connection to a Magic Router Agent Server inside office B server/computer.
4. Start and setup SFTP server in office B server/computer.
5. Everything is already, ask remote user to issue secure ftp connection(sftp client).
One of our customer told us that, his home broadband network port 80 is blocked by ISP, not allow incoming connection to port 80 as http server. Therefore we recommended him to share a global ip and forward back to his home.
The use of sharing global ip is because of port blocking. All server program actually is installed on final computer (very safe).
Simple step to do forward:
1. Find an office A with public/global ip, and allow incoming connection to port 80.
2. Find a computer 1 in the office A.
3. Start up Magic Router with standard routing, port 80 forward to FinalIp:81
4. Click start to finish. Since port 81 of final ip is allowed, therefore set to 81 as forward port in Magic Router of computer 1 in office A.
5. Install Http server (listen port as 81) on computer 2 in the Final network with public ip.
6. Finish, good luck.
By Magic Router, you can switch your office network (No global ip, no IT support) to become assessable outside. Startup Magic Router Agent Forwarder in the wanted office. Start up Startup Magic Router Agent Listener in IT support computer. Do what you want by VNC, RemoteDesktop, SFTP or Issue Command on Agent Listener - Shell Cmd on Forwarder.
Magic Router is support ONLY for Microsoft Platform. If you need to protect all your non Microsoft Platform Server, install Magic Router on Microsoft OS server (Gateway). Startup Magic Router and enable firewall and quota features, set correct listen port and forward to final destination server.
ie. listen port = 25, forward to ip = 192.168.1.1, to port = 25
ie. listen port = 110, forward to ip = 192.168.1.1, to port = 110
ie. listen port = 80, forward to ip = 192.168.1.2, to port = 80
One day, our web server was being attacked by the following ip.
152.104.192.122, 221.179.31.79.
Initially, we went to setup firewall block rule to deny hacker on hardware router. But after setting the
block ip rule and let the router to take effect, the hardware router (TP-LINK) was busy to death. The router was unable to handle over a thousand connections. We decided to direct plug the WAN cable on the web server network adapter. Start up Magic Router, set the listen port to 80 to block hacker ip.
Of course, this setting was already done on the web server, we no need to further config.
In conclusion, hardware router may not have the ability to reject hacker. Obviously, computer cpu speed, memory are much stronger than hardware router.
Using Agent Listener as VPN Client, you can connect 2 networks without setting up VPN.
Take an Account System as an example (KingDee Account). The Account Client was not support running outside local area network (remote connect). It must install some software so as to login remotely. Initially we provided three ways to try and test. The testing result was as follow:
1. The Account Client would cache some account data to the local computer, caching would minimize the data transfer between computers.
2. Running Remote Desktop Client (terminal server client), it needed many license and low speed performance. Caching was the feature of the account client, but Remote Desktop always fetch new screen to local computer even there was no data transfer between account client and account server.
3. Citrix Client also had the same result, but provide higher security control, only allow user to run the account system, not allow to touch other program in the terminal sever.
4. VPN Client, affecting the gateway of the local computer, and require many configuration on VPN server.
5. Running Magic Router Listener Client, faster with compression, lesser configuration, would not affect local computer gateway. Actually a secure tunnel was created to talk with server.
Preparation before setup:
Most of the XISCO router is support translating address for ftp server, but it does not handle for dynamic port. It opens all ports for listen in router, this will increase rick of attacking.
If your server is running NAT Routing, you can now define ftp ports in Magic Router then add these ports in NAT Routing > Services and Ports. The listen ip in Magic Router is the public ip, to ip is the private ip.
Using Agent Listener to connect to Agent Server that installed with KingDee Account Server.
Port forward definition:
192.168.1.252,1433,192.168.1.252,1433,TCP
192.168.1.252,6988,192.168.1.252,6988,TCP
192.168.1.252,137,192.168.1.252,137,UDP
Notes: to success login account server, must fulfill the followings.
1. First ip 192.168.1.252 in each line is listen ip of remote computer, you can hard code on remote server (started with Magic Router or use Bind Non Local Computer IP)
2. Listen ip on Agent Listener must same as the ip of KingDee Account Server (or Security Key Server).
3. Stop File and Printer Sharing/Printer Spooler on remote server.
Magic Router crash (or start up then shut down) immediately when click start(0) button or start up from system service. If you get this problem, the Mswinsck.ocx is missing from disk or removable disk. Simply, locate the Magic Router program folder, ensure there is a file Mswinsck.ocx, then click install.bat to re-register Mswinsck.ocx active x component.
The other possibility is missing mr.exe or missing mm.exe if u are start from mr*.exe or mm*.exe, find out these mr.exe, mm.exe and re-copy to Magic Router program folder again will fix.
If you completely remove all Magic Router program from your computer and some other program are using Mswinsck.ocx (Windows Socket Active X), you need to re-reigister Mswinsck.ocx. Type the following command in command prompt to finish.
regsvr32 /s c:\windows\system32\Mswinsck.ocx
Mswinsck.ocx is applicable to version 1.0.0 ONLY. Version after 1.0.0 will not have such problem.
Magic Router registration is not finish setting up will cause system service startup fail. Since Magic Router will write registration info to
HKEY_CURRENT_USER\Software\MagicRouter2
HKEY_LOCAL_MACHINE\Software\MagicRouter2
If these 4 keys Activate, ProductID, SN, UserName values not all filled in HKEY_LOCAL_MACHINE\Software\MagicRouter2, then system service will not start up. To fix this problem, manually create or copy the values from HKEY_CURRENT_USER\Software\MagicRouter to HKEY_LOCAL_MACHINE\Software\MagicRouter2.
Try to restart the service again….
Failure in writing HKEY_LOCAL_MACHINE may always due to non administrator accessing Magic Router program. Run with Administrator right will fix.
Sometimes even you input the Magic Router registration, but program is not running properly. This must due to incorrect product/user/sn entered. You need to clear the registration or direct go to About page, input again. If you want to manually clear the keys and cannot locate the 4 registry keys, pls use unregistration.exe to clear all Magic Router Registration. After clearance, you need to restart Magic Router and input registration information in About page.
If Magic Router run under Windows Server 2008, a missing file gameux.dll error will occur.
Due to mm.exe file name contradict Windows Server 2008. Fixing by copying mr.exe to mr2.exe, copying mm.exe to mm2.exe. Start mr2.exe will start up Magic Router.
You must keep mr.exe and mm.exe under the program folder. You cannot delete them, they are used for registration, validation and activation.
If Magic Router status bar show "cannot start system service" or "cannot install". Go to system service, see that Magic Router service installed or not.
If installed, but still get this error, is because of service cannot reinstall. Anyway service is installed.
Even service is installed, it may not start up correctly. It is because operating system security issue, not allow Magic Router to copy. Then you need to manual copy mm.exe.
If system service running path is C:\TEMP\mm1.exe -service -cf=config.1.txt. Then copy mm.exe to mm1.exe will fix problem. Try to start Magic Router system service again.
You must setup the "Start Button Seq." in Misc. Pages setting. Check which start button you need to start. If no values inside the text box, Magic Router start up will take no action. See Misc. > Overview for more.
First of all, if you got error running Magic Router. Ensure there are 2 files, MR.EXE or MM.EXE.
Most of the error is generated due to missing these 2 files, MR.EXE or MM.EXE.
Agent Server is used to bind listener and forwarder connection. If both side listener and forwarder connected with matched user name and password, no third party is allowed to break the connection. But if the third party (either listener or forwarder), entered the same user name and password, either connected listener or forwarder connection will break, and the third party will take place connection.
Sometimes you will find fail to connect with listener or forwarder even you input the correct user name and password, there must 1 side connected to Agent Server. To solve this case, reset connection by the following method.
1. Input the correct user name and password in listener client, press start(2) button, then press stop. This is forced to reset listener connection state to disconnected.
2. Input the correct user name and password in forwarder client, press start(3) button, then press stop. This is forced to reset forwarder connection state to disconnected.
3. Ok now, try to reconnect normally.....
Conclusion, the user name and password is very important. If you forget, and some computers are connected that you cannot touch/reach. You will not able to reset connection state.
1. Firewall, check firewall is allow Magic Router to access or not, enable by port or by mm*.exe.
2. Sometimes if you ever start up Magic Router from USB disk or program folder is removed, you need to reinstall Magic Router ActiveX Component and, click InstallActiveX.exe to finish.
3. If you run ActiveX under Windows Server 2008, you need to copy mm.exe to mm2.exe or any name name start (MUST) from "mm" and end with ".exe", ie. MMActiveX.EXE. Then type the following command in command prompt to re-register ActiveX
MMActiveX.exe /regserver
As you notice, there are lots of functions under Standard Network, will there be any contradiction or limitation. Find the following notes.
1. Bind non local ip is apply for all situation.
2. Auto Switch/Load Balancing and Header Forward can be enabled at the same time.
a. Auto Switch/Load Balancing is applied for standalone mode ONLY.
b. Header Forward is applied for standalone mode.
3. If both Auto Switch/Load Balancing and Header Forward are enabled, Header Forward will function first. If no header forward definition is match, auto switch/load balancing will take place.
4. QoS is applied for standalone mode and server mode, apply for header forward, auto switch.
5. User Authentication and Encryption are applied for client and server mode.
6. Firewall and quota are applied for all router modes.
7. Standard Network and Agent can start up on the same interface/exe.
8. UDP is support simple forward only, cannot use with auto switch, header forward, qos, coding, firewall, quota.
If Magic Router under System Service always use up 10% - 15% cpu usage, try to enable Misc. > Service Booster. It will highly increase the performance.
What is the difference between Magic Router Home Edition and Magic Router Prof Edition.
Magic Router Home Edition is major for personal usage or all routing functions.
Magic Router Prof Edition is designed for office, organization or big network.
Magic Router Home Edition | Magic Router Prof Edition | |
Price | USD39 | USD59 |
Allowed Computers Installation | 39 | 59 |
Connection Limit | no | no |
Network - Auto Switch Server | no | yes |
Network - User/Ip QoS Mapping | no | yes |
Coding - User Access Time | no | yes |
Firewall - Intelligent Firewall | no | yes |
Agent Server - Auto Forwarder | no | yes |
Agent Forwarder - Access Rules | no | yes |
DDOS Detection and Protection | no | yes |
FTP Routing | yes | yes |
First Release 1.0.0 on 2012-JAN-01, you can download trial or buy registered version now.
There are lots of changes since 1.0.0.
Standard Routing:
1. Advanced Settings, allow free input and non local ip.
2. Network Option, send buffer, recv buffer, small packet.
3. Magic Router is now support up to 32767 connections in version 2.0.0.
Coding:
1. SSL version 3 on client and server side.
2. User access time.
Firewall:
1. Intelligent Firewall with IPSEC System Service, protect port from attack to last second.
Agent:
1. Improved data encryption and transfer rate.
2. Auto Trigger Forwarder on Agent Server, run similarly as VPN Server.
3. Bind Non Local Network IP on Agent Listener.
4. Support FTP protocol on Agent Listener.
5. Easier file sharing client (File Explorer) setup.
6. Access rule on Agent Forwarder, Allowed ip, Blocked ip, Enabled Shell Cmd, Maximum connections
ActiveX Client:
1. SSL version 3 on ActiveX Client.
Misc.:
1. Support Chinese GB/Big5 user interface.
2. Save password with encryption option.
2. System Service Booster, increase service performance.
Tools:
1. Packet Viewer, view packet and designed for creating Port Forward Definition used on Agent Listener.
System Service:
1. Out of memory symptom under System Service is cleared.
Fixed on some bugs and new features added.
1. If too many unexpected errors, Magic Router will auto shutdown and restart. To enjoy this feature, remember to set start button sequence.
2. Fixed on Magic Router windows grouping in task bar.
3. Fixed on cannot correctly locate and display 2 Identical adapters.
4. Removed Trojan like program coding in Packet viewer.
5. Fixed on auto bind ip for Win Vista/7/8, using Netmask 255.255.255.255. But Windows XP or earlier version will get same subnet Ip problem, same subnet public Ip cannot connect correctly.
6. FTP Routing is added.
7. DDOS Detection and Protection
8. WeekDays parameter is added to Access Time and Agent Forwarder Access Rule
9. Increasing application server stability by Magic Router Data Buffering option.
If too many instant of Magic Router run under Windows Service, Out of memory problem exist.
The above problem is cleared from version 2.0.0.
If your email address (as registration user name) is too long, say over 32 character, it cannot login to our agent server. But you can use any user name less than 32 character, login to your own agent server. This bug will be fixed and support up to 100 character in coming new release.
TRIAL VERSION
Trial version is free to test for 30 days. Click the link to download.
Magic Router Home Edition Setup
http://www.magicrouter.net/download/mr-home-trial.exe
Magic Router Prof Edition Setup
http://www.magicrouter.net/download/mr-prof-trial.exe
Agent forwarder is derived from home trial edition and is free to use. If you have registered version, replace mm.exe and md.dat to circulate.
Click ms.exe to start Magic Router Forwarder.
If you start up other button, ie. start(0),start(1),start(2),start(4), it will become trial version.
http://www.magicrouter.net/download/mr-forwarder.zip
ActiveX client is derived from home trial edition and is free to use. If you have registered version, replace mm.exe and md.dat to circulate.
Click InstallActiveX.exe to install Magic Router ActiveX.
If you start up other button, ie. start(0),start(1),start(2),start(4), it will become trial version.
http://www.magicrouter.net/download/mr-activex.zip
Attention:
If Magic Router run under Windows Server 2008, a missing file gameux.dll error will occur.
Due to mm.exe file name contradict Windows Server 2008. Fixing by copying mr.exe to mr2.exe, copying mm.exe to mm2.exe. Start mr2.exe will start up Magic Router.
You must keep mr.exe and mm.exe under the program folder. You cannot delete them, they are used for registration, validation and activation.
DOWNLOAD FROM OTHER SITE (CRACKED)
Most cracked sharewares are embedded with trojan and virus. If you take this risk, take care. It is hard to guarantee that cracked version will not harm your computer or data.
Trial version do not need serial number, and it is not coded with serial number verification, don't take it.
THERE IS NO REGISTERED VERSION TO DOWNLOAD
There is only trial version to download. We will not post our registered version on Magic Router Support Centre. We will regularly send you fixed/updated/patched version by email.
Magic Router - DDOS Detector, it is a free SYN packet detector.
http://www.magicrouter.net/download/mr-ddos-detector.zip
If you need more protection on service ports, try Magic Router Firewall, protect port connection.
UDP Tester, if you using Magic Router to route your UDP application client or server, try this UDP Tester for routing correct or not.
http://www.magicrouter.net/download/mr-udp-tester.zip
Send us email to admin@magicrouter.net, or access our Magic Router Support Centre: http://www.magicrouter.net, send private message to "admin" or issue any topic.