تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
6504 أدوات العرض

Hi All,

How can i get IP Address in python file to restrict that ip who using XML-RPC Call.

e.g

I have two server both installed openerp and i want to restrict second server's ip in first server for not use an XML-RPC how can i do?

Thanks in advance.

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

Hi Ivan,

Thanks for your answer it is possible using firewall but i want to create using Odoo so have any idea about it?

Thanks,
Harsh Dhaduk

الصورة الرمزية
إهمال

As Odoo does not have firewall function, then you need to build (part of) the firewall function into Odoo. The question is why do you want to do that instead of using firewall?

الكاتب

Hi Ivan, Thanks for your reply. the concept of using XML-RPC i want to add some ip's in custome module and only ip can call which i will put in openerp not using firewall. I hope you understand what is my requirement. Have any idea about this one?

I don't have experience in that particular area. You can pick some ideas from the following post: https://www.odoo.com/forum/help-1/question/how-to-get-user-ip-address-25735.

أفضل إجابة

Use a firewall.  If you are using Ubuntu, use gufw (https://help.ubuntu.com/community/Gufw).  Nasically what you want to do is to deny, in the 1st server, the 2nd server IP address from using port you are using for XML-RPC (default is 8069)

الصورة الرمزية
إهمال
أفضل إجابة

Just bind the xml-rpc interface to localhost, 127.0.0.1 for ipv4. In openerp configuration:

xmlrpc_interface = 127.0.0.1

With that configuration the server will only accept request from localhost, i.e. the same machine with the server. I assume you want your second server 'hidden' from the internet.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
مايو 16
7427
1
يوليو 17
6086
3
يوليو 25
2728
0
مارس 25
1229
0
يناير 25
3286