Jump to content
  • 0

Forward correctly proxy to main server


Question

Posted (edited)

Heya to all,  i have a question

Its possible to get IP Origin when players connecting throw proxy server ?

Main Server -> 144.xx.xx.xx -> Proxy Server -> 66.xx.xx.xx

I can see ip origin when players connected to main server but when its connecting via proxy show this proxy ip DB.

I use this guide: https://rathena.org/board/topic/119046-proxy-setup-guide-hide-vps-ip/

Edited by vasikokk

4 answers to this question

Recommended Posts

  • 0
Posted
On 4/12/2020 at 11:52 AM, vasikokk said:

Heya to all,  i have a question

Its possible to get IP Origin when players connecting throw proxy server ?

Main Server -> 144.xx.xx.xx -> Proxy Server -> 66.xx.xx.xx

I can see ip origin when players connected to main server but when its connecting via proxy show this proxy ip DB.

I use this guide: https://rathena.org/board/topic/119046-proxy-setup-guide-hide-vps-ip/

 

Finally i resolve it! Dont add -> firewall-cmd --zone=INSERT_ZONE --add-masquerade --permanent

For remove in server proxy this command -> firewall-cmd --zone=public --remove-masquerade --permanent

 

/* Port Forwarding CentOS 7 FirewallD */
// ========================================================================
// Please read the comments per line it is self-explanatory.
// Important Parameters:
// INSERT_ZONE = output of the get default zone
// INSERT_IP = is the public IP of your main VPS or server
// If you like the guide give it a thumbs up!
// ========================================================================

// This command is to get the default zone being used by your VM.
firewall-cmd --get-default-zone

// This command is to check all rules applied to your VM by the current active zone.
firewall-cmd --zone=INSERT_ZONE --list-all

// Enabling Masquerade Status (IP Forwarding). 
// This is the important configuration else below won't work
firewall-cmd --zone=INSERT_ZONE --add-masquerade --permanent

// IP/Traffic forwarding
// Make sure you have configured masquerade
firewall-cmd --zone="INSERT_ZONE" --add-forward-port=port=6900:proto=tcp:toport=6900:toaddr=INSERT_IP --permanent
firewall-cmd --zone="INSERT_ZONE" --add-forward-port=port=6121:proto=tcp:toport=6121:toaddr=INSERT_IP --permanent
firewall-cmd --zone="INSERT_ZONE" --add-forward-port=port=5121:proto=tcp:toport=5121:toaddr=INSERT_IP --permanent

// Add rules for ro-ports (assuming that you didn't change the port)
firewall-cmd --zone=INSERT_ZONE --add-port=6900/tcp --permanent
firewall-cmd --zone=INSERT_ZONE --add-port=6121/tcp --permanent
firewall-cmd --zone=INSERT_ZONE --add-port=5121/tcp --permanent

// Reload rules to take effect
firewall-cmd --reload

 

  • Upvote 1
  • 0
Posted
On 4/13/2020 at 10:02 PM, vasikokk said:

 

Finally i resolve it! Dont add -> firewall-cmd --zone=INSERT_ZONE --add-masquerade --permanent

For remove in server proxy this command -> firewall-cmd --zone=public --remove-masquerade --permanent

 


/* Port Forwarding CentOS 7 FirewallD */
// ========================================================================
// Please read the comments per line it is self-explanatory.
// Important Parameters:
// INSERT_ZONE = output of the get default zone
// INSERT_IP = is the public IP of your main VPS or server
// If you like the guide give it a thumbs up!
// ========================================================================

// This command is to get the default zone being used by your VM.
firewall-cmd --get-default-zone

// This command is to check all rules applied to your VM by the current active zone.
firewall-cmd --zone=INSERT_ZONE --list-all

// Enabling Masquerade Status (IP Forwarding). 
// This is the important configuration else below won't work
firewall-cmd --zone=INSERT_ZONE --add-masquerade --permanent

// IP/Traffic forwarding
// Make sure you have configured masquerade
firewall-cmd --zone="INSERT_ZONE" --add-forward-port=port=6900:proto=tcp:toport=6900:toaddr=INSERT_IP --permanent
firewall-cmd --zone="INSERT_ZONE" --add-forward-port=port=6121:proto=tcp:toport=6121:toaddr=INSERT_IP --permanent
firewall-cmd --zone="INSERT_ZONE" --add-forward-port=port=5121:proto=tcp:toport=5121:toaddr=INSERT_IP --permanent

// Add rules for ro-ports (assuming that you didn't change the port)
firewall-cmd --zone=INSERT_ZONE --add-port=6900/tcp --permanent
firewall-cmd --zone=INSERT_ZONE --add-port=6121/tcp --permanent
firewall-cmd --zone=INSERT_ZONE --add-port=5121/tcp --permanent

// Reload rules to take effect
firewall-cmd --reload

 

Did you ask your player to try the different between have masquerade and doesn't? I mean either lag or solve the problem?

As I know if you not put masquerade, that mean your player not in the right shoes. Which mean not in your proxy server. So player will still facing lag issue.

  • 0
Posted (edited)
22 hours ago, HaARiZz said:

Did you ask your player to try the different between have masquerade and doesn't? I mean either lag or solve the problem?

As I know if you not put masquerade, that mean your player not in the right shoes. Which mean not in your proxy server. So player will still facing lag issue.

I have done tests and if it goes through the proxy server, what the masquerade does is that it does not pass the real IP of the player. Therefore, as you are redirecting traffic from your main server to the proxy server, what it does is reduce latency.

PD: IPtables works better than firewall-cmd (firewalld)

Edited by vasikokk
  • 0
Posted
On 4/13/2020 at 10:02 PM, vasikokk said:

For remove in server proxy this command -> firewall-cmd --zone=public --remove-masquerade --permanent

I tried this but when I removed this I can't connect to the server anymore. Any idea how to solve this?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...