Problem with proxy

outplayed

Moderator
Moderator
V.I.P Member
Collaborate
Registered
Joined
Oct 27, 2019
Messages
114
Points
43

Reputation:

Does anyone know why every member in my web is using the same IP, im using a VPS from contabo service
Capture.PNG
 

boo

Member
Registered
Joined
Aug 29, 2019
Messages
23
Points
3

Reputation:

boo

Member
Registered
Joined
Aug 29, 2019
Messages
23
Points
3

Reputation:

If for some reason your using proxy_pass you need to add below:

Code:
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
 

outplayed

Moderator
Moderator
V.I.P Member
Collaborate
Registered
Joined
Oct 27, 2019
Messages
114
Points
43

Reputation:

Where should i add it ?
 

boo

Member
Registered
Joined
Aug 29, 2019
Messages
23
Points
3

Reputation:

So your getting the server ip for all users, using apache?

No idea how you have managed that.
 

thomsa

Well-known member
Registered
Joined
Jun 22, 2019
Messages
95
Points
18

Reputation:

what your cp ?
 

fmsc88

Collaborate
Collaborate
Registered
Joined
May 22, 2019
Messages
36
Points
18

Reputation:

@outplayed i had same issue,
go to src/config.php and add this if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }

then restart apache and mysql
 

boo

Member
Registered
Joined
Aug 29, 2019
Messages
23
Points
3

Reputation:

That's for cloudlare? He isn't getting cloudflare IP it's showing server IP.
 
View previous replies…

boo

Member
Registered
Joined
Aug 29, 2019
Messages
23
Points
3

Reputation:

I still think it's to do with proxypass. I would normally say look in apache 000-default.conf, but your using a panel and I'm sure your files will be modified to death.
 
Last edited:

outplayed

Moderator
Moderator
V.I.P Member
Collaborate
Registered
Joined
Oct 27, 2019
Messages
114
Points
43

Reputation:

I´ll and update what happens
 

sucre13

Collaborate
Collaborate
Registered
Joined
Jan 19, 2019
Messages
158
Points
73

Reputation:

a lot of times that proxy can be google robots don't take that away
 

outplayed

Moderator
Moderator
V.I.P Member
Collaborate
Registered
Joined
Oct 27, 2019
Messages
114
Points
43

Reputation:

thats not the thing, thats the IP from my VSP
 
View previous replies…

sucre13

Collaborate
Collaborate
Registered
Joined
Jan 19, 2019
Messages
158
Points
73

Reputation:

@outplayed use ConfigServer Security & Firewall to protect your vps vestacp has that option although I use directmin
 

outplayed

Moderator
Moderator
V.I.P Member
Collaborate
Registered
Joined
Oct 27, 2019
Messages
114
Points
43

Reputation:

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
V.I.P Member
Registered
Joined
Nov 13, 2018
Messages
5,310
Points
698

Reputation:

outplayed

Moderator
Moderator
V.I.P Member
Collaborate
Registered
Joined
Oct 27, 2019
Messages
114
Points
43

Reputation:

I was checking the config and due im using VestaCP i have Nginx and Apache both
 

boo

Member
Registered
Joined
Aug 29, 2019
Messages
23
Points
3

Reputation:

If your using apache and nginx together you need to find the proxy_pass in nginx default and add:

Code:
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
 

outplayed

Moderator
Moderator
V.I.P Member
Collaborate
Registered
Joined
Oct 27, 2019
Messages
114
Points
43

Reputation:

I saw that i cant remember where now, but the thing is, where should i add it ?
 

PuTyTy

Member
Registered
Joined
Dec 16, 2019
Messages
14
Points
3

Reputation:

Does anyone know why every member in my web is using the same IP, im using a VPS from contabo service
hello,

I already had this problem, this problem comes from your web hosting I think !

I no longer know how I solved it
 

outplayed

Moderator
Moderator
V.I.P Member
Collaborate
Registered
Joined
Oct 27, 2019
Messages
114
Points
43

Reputation:

I tried everything and nothing im done!
 

boo

Member
Registered
Joined
Aug 29, 2019
Messages
23
Points
3

Reputation:

/etc/nginx/sites-available/default

In there you will see proxy_pass something like this :

proxy_pass https://127.0.0.1:444;

You need to add below:

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

And restart nginx: sudo systemctl restart nginx
 

outplayed

Moderator
Moderator
V.I.P Member
Collaborate
Registered
Joined
Oct 27, 2019
Messages
114
Points
43

Reputation:

Inside the nginx directory doesnt exist such ubication, it does inside the apache2 location /etc/apache2/sites-available/default

But the default script is empty
 

outplayed

Moderator
Moderator
V.I.P Member
Collaborate
Registered
Joined
Oct 27, 2019
Messages
114
Points
43

Reputation:

This the nginx directory
nginx.PNG

This apache2
apache.PNG
 

sucre13

Collaborate
Collaborate
Registered
Joined
Jan 19, 2019
Messages
158
Points
73

Reputation:

my question is and what is the problem with that proxy the vps is attacking you ?????? '' only that proxy is in your vps
 

sucre13

Collaborate
Collaborate
Registered
Joined
Jan 19, 2019
Messages
158
Points
73

Reputation:

if you continue with the same problem use the cento 7 operating system with the cento web panel
 

outplayed

Moderator
Moderator
V.I.P Member
Collaborate
Registered
Joined
Oct 27, 2019
Messages
114
Points
43

Reputation:

i have a ton of webs in that vps i dont think im gonna change all that again, must be another way
 

dinhphucv

VIP Member
V.I.P Member
Registered
Joined
Sep 16, 2019
Messages
1
Points
3

Reputation:

Add to your config.php
Code:
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_X_FORWARDED_FOR"];
 

outplayed

Moderator
Moderator
V.I.P Member
Collaborate
Registered
Joined
Oct 27, 2019
Messages
114
Points
43

Reputation:

THX to all who helped me into this mess, i already did it, im doing a tutorial and ill post it in case anyone need it in a future.
 

thomsa

Well-known member
Registered
Joined
Jun 22, 2019
Messages
95
Points
18

Reputation:

in this case i think vesta install not complete.

or bug on reverse proxy and apache.
 

outplayed

Moderator
Moderator
V.I.P Member
Collaborate
Registered
Joined
Oct 27, 2019
Messages
114
Points
43

Reputation:

thomsa

Well-known member
Registered
Joined
Jun 22, 2019
Messages
95
Points
18

Reputation:

yes, it is.
i use directadmin nginx_apache not problem.

to backup xenforo+db and install new os&vesta.
 
Top