mtprotoproxy icon indicating copy to clipboard operation
mtprotoproxy copied to clipboard

use multi ports

Open karimi12 opened this issue 6 years ago • 3 comments

some my user have problem with connect to same port ( for example 3250) therefore i use multi port ( example 80 ,443 ) for this action i need run multi instance and this action need memory . please add a property for this problem

karimi12 avatar Apr 26 '19 15:04 karimi12

Can't you use local port forwarding? For example you run your proxy on port 443 and you want to accept connections form port 80 too. With iptables you can do this:

sysctl -w net.ipv4.conf.all.route_localnet=1
iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 443

If you are using CentOS or Redhat and you have firewalld you can use:

firewall-cmd --zone=external --add-masquerade
firewall-cmd --zone=external --add-forward-port=port=80:proto=tcp:toport=443
firewall-cmd --runtime-to-permanent

Source So all traffics on port 80 will be redirected to port 443.

HirbodBehnam avatar May 22 '19 16:05 HirbodBehnam

This is net.ipv4.conf.all.route_localnet=1 an unsecured method and abnormal traffic.

SimWhite avatar May 22 '19 16:05 SimWhite

@SimWhite It was written here

HirbodBehnam avatar May 22 '19 16:05 HirbodBehnam