Jump to content


How to control the login IP for each user


  • Please log in to reply
6 replies to this topic

#1 sopato

sopato

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 27 July 2018 - 03:37 AM

userA from IPA ---> OK
userB from IPB ---> OK
userA from IPB ---> Forbid
userB from IPA ---> Forbid

How to config the IP+user control?

Thanks.

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 640 posts

Posted 27 July 2018 - 06:30 AM

In p4 protect:

write userA IPA //...
write userB IPB //...


#3 sopato

sopato

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 08 November 2018 - 10:00 AM

View PostSambwise, on 27 July 2018 - 06:30 AM, said:

In p4 protect:

write userA IPA //...
write userB IPB //...

Thanks , so if there are some subnet , how to define ,I try it as :

write userA subnetA,subnetB //...

It's fail.

Thanks .

#4 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 640 posts

Posted 08 November 2018 - 08:33 PM

See the "p4 protect" documentation on how to specify IP ranges:

https://www.perforce..._protect.fields


Quote


The IP address of the client host. IPv6 addresses and IPv4 addresses are also supported. You can use the * wildcard to refer to all IP addresses, but only when you are not using CIDR notation.

If you use the * wildcard with an IPv6 address, you must enclose the entire IPv6 address in square brackets. For example, [2001:db8:1:2:*] is equivalent to [2001:db8:1:2::]/64. Best practice is to use CIDR notation, surround IPv6 addresses with brackets, and to avoid the * wildcard.



#5 sopato

sopato

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 09 November 2018 - 04:03 AM

View PostSambwise, on 08 November 2018 - 08:33 PM, said:

See the "p4 protect" documentation on how to specify IP ranges:

https://www.perforce..._protect.fields

I check the doc, but no refers for two and more subnets for one account, for example
write user joe 1.1.1.0/24 //...
write user joe 2.2.2.0/24 //...

It works,but how to define it in only ONE line ? It does not work  like this:
write user joe 1.1.1.0/24,2.2.2.0/24 //...	 #NOT WORK

Thanks a lot .

#6 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 640 posts

Posted 09 November 2018 - 04:20 AM

If you want to grant access to two specific subnets, use a line for each, e.g.:

write user joe 1.1.1.0/24 //...
write user joe 2.2.2.0/24 //...

#7 sopato

sopato

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 09 November 2018 - 06:02 AM

View PostSambwise, on 09 November 2018 - 04:20 AM, said:

If you want to grant access to two specific subnets, use a line for each, e.g.:

write user joe 1.1.1.0/24 //...
write user joe 2.2.2.0/24 //...

Got it , thanks.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users