S-10 писал(а):
Пробовал вот так:
create access_profile ip source_ip_mask 0.0.0.0 destination_ip_mask 91.142.0.0 profile_id 1
config access_profile profile_id 1 add access_id 1 ip source_ip 0.0.0.0 destination_ip 91.142.0.0 port 1 deny
По моему разумению это типо я запретил выход на любые айпишники, юзера из подсети 91.142.0.0 подключенного в 1-й порт коммутатора. Но это не работает.
S-10 писал(а):
Сделал наоборот:
create access_profile ip source_ip_mask 91.142.0.0 destination_ip_mask 0.0.0.0 profile_id 1
config access_profile profile_id 1 add access_id 1 ip source_ip 91.142.0.0 destination_ip 0.0.0.0 port 1 deny
Не работает.
это не работает и не будет работать потому что Вы спутали 2 понятия - "адрес сети" и "маска сети", предполагая что Вам надо
S-10 писал(а):
разрешить юзеру на 1-ом порту коммутатора доступ только к определенному айпишнику в сети
то в Вашем случае надо было в 1-й раз (для всей сети) делать так:
Код:
create access_profile ip destination_ip_mask 255.255.0.0 profile_id 1
config access_profile profile_id 1 add access_id 1 ip destination_ip 91.142.0.0 port 2-28 permit
create access_profile ip destination_ip_mask 0.0.0.0 profile_id 2
config access_profile profile_id 2 add access_id 1 ip destination_ip 0.0.0.0 port 2-28 deny
а во 2-й раз (для адреса) - так:
Код:
create access_profile ip destination_ip_mask 255.255.255.255 profile_id 1
config access_profile profile_id 1 add access_id 1 ip destination_ip 91.142.157.47 port 2-28 permit
create access_profile ip destination_ip_mask 0.0.0.0 profile_id 2
config access_profile profile_id 2 add access_id 1 ip destination_ip 0.0.0.0 port 2-28 deny
но исходя из того что на этом форуме под вопросом:
S-10 писал(а):
разрешить юзеру на 1-ом порту коммутатора доступ только к определенному айпишнику в сети, а доступ на все остальные айпи заблокировать?
в большинстве случаев подразумевается вопрос - "как на на определенном, конкретном порту разрешить пользоваться только одним определенным, конкретным адресом?"
основываясь на:
S-10 писал(а):
У компа на 1-м порту коммутатора айпишник 91,142,157,47.
то в простом варианте - так:
Код:
create access_profile ethernet ethernet_type profile_id 1
config access_profile profile_id 1 add access_id 1 ethernet ethernet_type 0x806 port 1 permit
create access_profile ip source_ip_mask 255.255.255.255 profile_id 2
config access_profile profile_id 2 add access_id 1 ip source_ip 91.142.157.47 port 1 permit
create access_profile ethernet source_mac 00-00-00-00-00-00 profile_id 3
config access_profile profile_id 3 add access_id auto_assign ethernet source_mac 00-00-00-00-00-00 port 1 deny
но, IMHO более-менее правильно так (более подробно
тут):
Код:
create access_profile packet_content_mask offset_0-15 0x0 0x0 0x0 0xffff0000 offset_16-31 0xffff0000 0x0 0x0 0xffffffff profile_id 1
config access_profile profile_id 1 add access_id 1 packet_content offset 12 0x08060000 offset 16 0x08000000 offset 28 0x5b8e9d2f port 1 permit
create access_profile ethernet destination_mac ff-ff-ff-ff-ff-ff profile_id 2
config access_profile profile_id 2 add access_id 1 ethernet destination_mac ff-ff-ff-ff-ff-ff port 1 deny
create access_profile ip source_ip_mask 255.255.255.255 profile_id 3
config access_profile profile_id 3 add access_id 1 ip source_ip 91.142.157.47 port 1 permit
create access_profile ethernet source_mac 00-00-00-00-00-00 profile_id 4
config access_profile profile_id 4 add access_id 1 ethernet source_mac 00-00-00-00-00-00 port 1 deny
если же я не прав и Вам надо именно то о чем Вы спрашивали - см. 1-ю часть сообщения