Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Tutorials
Make own TCP Reverse Proxy with Linux (CentOS 6)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Marko97" data-source="post: 442045" data-attributes="member: 36313"><p><strong><span style="color: rgb(41, 105, 176)">[What you need?]</span></strong></p><p><span style="color: rgb(0, 0, 0)">- Protected VPS with CentOS 6.x;</span></p><p><span style="color: rgb(41, 105, 176)">- </span><span style="color: rgb(0, 0, 0)">SSH access (PuTTy for example);</span></p><p></p><p><span style="color: rgb(41, 105, 176)"><strong>[How to proceed?]</strong></span></p><p></p><p><span style="color: rgb(0, 0, 0)">1) Log via SSH in your protected VPS;</span></p><p><span style="color: rgb(0, 0, 0)">2) Type these commands in order:</span></p><p><span style="color: rgb(0, 0, 0)">[CODE]sudo su[/CODE]</span></p><p><span style="color: rgb(0, 0, 0)">[CODE]cd /etc/init.d[/CODE]</span></p><p><span style="color: rgb(0, 0, 0)">[CODE]cat /proc/sys/net/ipv4/conf/eth0/forwarding[/CODE]</span></p><p><span style="color: rgb(0, 0, 0)">[CODE]sysctl net.ipv4.conf.eth0.forwarding=1[/CODE]</span></p><p><span style="color: rgb(0, 0, 0)">[CODE]nano myproxy[/CODE]</span></p><p><span style="color: rgb(0, 0, 0)">3) Delete all content and type this:</span></p><p>[CODE]sysctl net.ipv4.conf.eth0.forwarding=1</p><p></p><p>echo 1 > /proc/sys/net/ipv4/ip_forward</p><p></p><p>iptables -t nat -A POSTROUTING -s IP-PROXY/24 -o eth0 -j MASQUERADE</p><p>iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE</p><p>iptables -t nat -A PREROUTING -i eth0 -p tcp --dport PORT-PROXY -j DNAT --to EMULATOR-IP:EMULATOR-PORT[/CODE]</p><p>IP-PROXY = Your IP VPS protected by AntiDDoS;</p><p>PORT-PROXY = Your port VPS protected by AntiDDoS (you can choose any port if you want);</p><p>EMULATOR-IP = Your real unprotected IP VPS;</p><p>EMULATOR-PORT = Your real unprotected IP port.</p><p>Then, press CTRL + X, press Y and press Enter;</p><p></p><p>4) Open the choosen port (PORT-PROXY) in the firewall;</p><p>5) Type these commands in order:</p><p>[CODE]chmod a+x myproxy[/CODE]</p><p>[CODE]service myproxy restart[/CODE]</p><p>6) Configure only the client PHP file with protected IP and protected port. In the emulator leave the original IP;</p><p>7) Start the emulator;</p><p>8) Go in this <a href="https://www.yougetsignal.com/tools/open-ports/" target="_blank">site</a> to test if your proxy work or not. Inside type the protected IP and protected port. If the port is open the proxy work, else I check if you've opened the port in the firewall.</p><p>9) Log in your client. ENJOY.</p><p></p><p><span style="color: rgb(41, 105, 176)"><strong>[I want to change my last configuration with a new IP. How to proceed?]</strong></span></p><p><span style="color: rgb(0, 0, 0)">1) Type this command:</span></p><p><span style="color: rgb(0, 0, 0)">[CODE]reboot[/CODE]</span></p><p><span style="color: rgb(0, 0, 0)">Then, wait until the protected VPS is rebooted;</span></p><p><span style="color: rgb(0, 0, 0)">2) Refollow all steps written above.</span></p></blockquote><p></p>
[QUOTE="Marko97, post: 442045, member: 36313"] [B][COLOR=rgb(41, 105, 176)][What you need?][/COLOR][/B] [COLOR=rgb(0, 0, 0)]- Protected VPS with CentOS 6.x;[/COLOR] [COLOR=rgb(41, 105, 176)]- [/COLOR][COLOR=rgb(0, 0, 0)]SSH access (PuTTy for example);[/COLOR] [COLOR=rgb(41, 105, 176)][B][How to proceed?][/B][/COLOR] [COLOR=rgb(0, 0, 0)]1) Log via SSH in your protected VPS; 2) Type these commands in order: [CODE]sudo su[/CODE] [CODE]cd /etc/init.d[/CODE] [CODE]cat /proc/sys/net/ipv4/conf/eth0/forwarding[/CODE] [CODE]sysctl net.ipv4.conf.eth0.forwarding=1[/CODE] [CODE]nano myproxy[/CODE] 3) Delete all content and type this:[/COLOR] [CODE]sysctl net.ipv4.conf.eth0.forwarding=1 echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -s IP-PROXY/24 -o eth0 -j MASQUERADE iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -t nat -A PREROUTING -i eth0 -p tcp --dport PORT-PROXY -j DNAT --to EMULATOR-IP:EMULATOR-PORT[/CODE] IP-PROXY = Your IP VPS protected by AntiDDoS; PORT-PROXY = Your port VPS protected by AntiDDoS (you can choose any port if you want); EMULATOR-IP = Your real unprotected IP VPS; EMULATOR-PORT = Your real unprotected IP port. Then, press CTRL + X, press Y and press Enter; 4) Open the choosen port (PORT-PROXY) in the firewall; 5) Type these commands in order: [CODE]chmod a+x myproxy[/CODE] [CODE]service myproxy restart[/CODE] 6) Configure only the client PHP file with protected IP and protected port. In the emulator leave the original IP; 7) Start the emulator; 8) Go in this [URL='https://www.yougetsignal.com/tools/open-ports/']site[/URL] to test if your proxy work or not. Inside type the protected IP and protected port. If the port is open the proxy work, else I check if you've opened the port in the firewall. 9) Log in your client. ENJOY. [COLOR=rgb(41, 105, 176)][B][I want to change my last configuration with a new IP. How to proceed?][/B][/COLOR] [COLOR=rgb(0, 0, 0)]1) Type this command: [CODE]reboot[/CODE] Then, wait until the protected VPS is rebooted; 2) Refollow all steps written above.[/COLOR] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Tutorials
Make own TCP Reverse Proxy with Linux (CentOS 6)
Top