Help with TCP Proxy

khadgar

New Member
Apr 3, 2016
28
8
Hey,
I hope you guys can help me.
So I am trying to set up a TCP Proxy on my hotel. It is all set up and working. I have kept the EMU config to the VPS IP and Port and changed client.php to the proxy IP and port. The client loads fine.

Here is the problem: When a player connects on the hotel, it shows their IP as the Proxy IP. This is obviously a problem for two reasons;
1) It means that my usual restriction of 5 connections per IP is not possible, due to the EMU logging each players IP as the proxy IP.
2) I am unable to IP ban anyone, as it bans the proxy IP.. meaning noone can log in.

I am scratching my head here trying to figure out where I am going wrong. I hope you fantastic people can help!

Thanks,
Steve
 

Brad

Well-Known Member
Jun 5, 2012
2,320
993
Hey,
I hope you guys can help me.
So I am trying to set up a TCP Proxy on my hotel. It is all set up and working. I have kept the EMU config to the VPS IP and Port and changed client.php to the proxy IP and port. The client loads fine.

Here is the problem: When a player connects on the hotel, it shows their IP as the Proxy IP. This is obviously a problem for two reasons;
1) It means that my usual restriction of 5 connections per IP is not possible, due to the EMU logging each players IP as the proxy IP.
2) I am unable to IP ban anyone, as it bans the proxy IP.. meaning noone can log in.

I am scratching my head here trying to figure out where I am going wrong. I hope you fantastic people can help!

Thanks,
Steve
Are you using a HTTP Proxy aswell?
 

khadgar

New Member
Apr 3, 2016
28
8
Brilliant! Thanks dude, I will try that.
 
Heyy,
Thanks for your previous help! Unfortunately I am having the same problem.
I am guessing the line in global.php you were refering to was
Code:
if(isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }
And I have changed it to
Code:
if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR']; }

Let me know if I have done that wrong. That code is not in class.users.php.
You must be registered for see images attach


Thanks for your help!

Steve
 

Brad

Well-Known Member
Jun 5, 2012
2,320
993
Brilliant! Thanks dude, I will try that.
 
Heyy,
Thanks for your previous help! Unfortunately I am having the same problem.
I am guessing the line in global.php you were refering to was
Code:
if(isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }
And I have changed it to
Code:
if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR']; }

Let me know if I have done that wrong. That code is not in class.users.php.
You must be registered for see images attach


Thanks for your help!

Steve
Make sure maxconperip in your emu config is higher than 500 .
 

khadgar

New Member
Apr 3, 2016
28
8
This worked perfectly! Many thanks for your help.

Steve
 
Okay... So I thought this fixed the problem, but it hasn't.
I changed the 'maxconperip' in the EMU config to 550, but it is still only letting max of 2 people on at a time. When we turn the proxy off, people can connect no problem!
Help!

Thanks,
Steve
 

Users who are viewing this thread

Top