Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`audits_userloginlog`登录ip存入的是jumpsever主机的内网ip. #3165

Open
oldthreefeng opened this issue Aug 27, 2019 · 3 comments

Comments

@oldthreefeng
Copy link

commented Aug 27, 2019

[简述你的问题]
这边web端显示的登录ip显示是jumpsever主机的内网ip.从数据库里面查阅也是一样的.很纳闷

使用版本

[请提供你使用的Jumpserver版本 1.x.x 注: 0.3.x不再提供支持]
1.4.9

问题复现步骤
  1. [步骤1]
    web端查看登录日志,查看的ip都是jumpserver的本机的ip,
    使用的服务器是ucloud云服务器.
# cat /etc/redhat-release
CentOS release 6.5 (Final)
  1. [步骤2]
    通过web端http://ip/;登录jumpserver,显示的ip正常.
具体表现[截图可能会更好些,最好能截全]

image

其他

找了半天源码 ip = models.GenericIPAddressField(verbose_name=_('Login ip')) ;
在这里获取login_ip的,但是不知道怎么弄~便提了这个issue;
我在想,通过ssh连接jumpserver,获取的ip是通过什么方式获取的.如果这个解决了,就ok了
[注:] 完成后请关闭 issue

@wojiushixiaobai

This comment has been minimized.

Copy link
Collaborator

commented Aug 29, 2019

@oldthreefeng tcp获取真实ip,1.5.2已经初步支持,等待进一步优化
server {
listen 2220;
proxy_pass 127.0.0.1:2222;
proxy_protocol on;
proxy_connect_timeout 1s; # detect failure quickly
}

@oldthreefeng

This comment has been minimized.

Copy link
Author

commented Aug 30, 2019

ssh获取的真实ip却没有拿到,这是为什么呢~
存入数据库的ip是jumpserver本机的内网ip,很想解决这个问题,
因为想看看登录失败的ip,这样可以利用防火墙阻挡他们, @wojiushixiaobai

@bufer

This comment has been minimized.

Copy link

commented Sep 5, 2019

@wojiushixiaobai 1.5.2-2现在通过SSH登录IP显示正常,但登录状态不对,全部显示为失败,实际全部都登录成功的,同时也是开启MFA登录的
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.