Firewall cmd error unrecognized arguments

На чтение 2 мин Опубликовано 20.03.2019

На чтение 2 мин Опубликовано 20.03.2019

Содержание

  1. Проблема
  2. Решение
  3. Остановить firewalld в CentOS / RHEL 7
  4. Отключить firewalld в CentOS / RHEL 7
  5. Включить firewalld в CentOS / RHEL 7

Проблема

Почему то при выполнении команды firewall-cmd –state наблюдается следующая ошибка:

-bash: firewall: command not found

Решение

Если при выполнении команды есть синтаксическая ошибка, можно получить ошибку следующих видов: –

# firewall-cmd -state
usage: see firewall-cmd man page
firewall-cmd: error: unrecognized arguments: -state
# firewall -cmd --state
-bash: firewall: command not found

Остановить firewalld в CentOS / RHEL 7

Следующая команда может быть выполнена для остановки брандмауэра:

# systemctl stop firewalld

Например

# systemctl status firewalld

firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
   Active: active (running) since Thu 2015-03-12 09:31:07 IST; 5h 33min ago
 Main PID: 814 (firewalld)
   CGroup: /system.slice/firewalld.service
           └─814 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Mar 12 09:31:06 rhel7-server systemd[1]: Starting firewalld - dynamic firewall daemon...
Mar 12 09:31:07 rhel7-server systemd[1]: Started firewalld - dynamic firewall daemon.
# firewall-cmd --state
running
# systemctl stop firewalld
# firewall-cmd --state
not running

Отключить firewalld в CentOS / RHEL 7

Ниже приведена команда для отключения службы (отключите службу до следующей перезагрузки или любого другого триггера.)

# systemctl disable firewalld.service

Например:

# systemctl disable firewalld.service
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
rm '/etc/systemd/system/basic.target.wants/firewalld.service'

Включить firewalld в CentOS / RHEL 7

Чтобы снова включить службу firewalld, используйте следующую команду:

# systemctl enable firewalld.service

Например:

# systemctl enable firewalld.service
ln -s '/usr/lib/systemd/system/firewalld.service' '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
ln -s '/usr/lib/systemd/system/firewalld.service' '/etc/systemd/system/basic.target.wants/firewalld.service'

Убедитесь, что firewalld включен или отключен в CentOS / RHEL 7

# systemctl is-enabled firewalld
disabled
# systemctl is-enabled firewalld
enabled

Пожалуйста, не спамьте и никого не оскорбляйте.

Это поле для комментариев, а не спамбокс.

Рекламные ссылки не индексируются!

[root@ip-11-0-0-239 centos]# firewall-cmd —zone=trusted —add-source=94.204.104.194/32 success [root@ip-11-0-0-239 centos]# firewall-cmd —zone=trusted —add-source=94.206.104.194/32 success [root@ip-11-0-0-239 centos]# firewall-cmd —zone=trusted success [root@ip-11-0-0-239 centos]# firewall-cmd —list-sources You’re performing an operation over default zone (‘public’), but your connections/interfaces are in zone ‘trusted’ (see —get-active-zones) You most likely need to use —zone=trusted option. [root@ip-11-0-0-239 centos]# firewall-cmd —list-sources —zone=trusted 94.204.104.194/32 94.206.104.194/32 [root@ip-11-0-0-239 centos]# firewall-cmd —zone=trusted —rem usage: see firewall-cmd man page firewall-cmd: error: ambiguous option: —rem could match —remove-lockdown-whitelist-context, —remove-rule, —remove-icmp-block, —remove-service, —remove-lockdown-whitelist-command, —remove-lockdown-whitelist-uid, —remove-port, —remove-interface, —remove-source, —remove-rules, —remove-lockdown-whitelist-user, —remove-chain, —remove-masquerade, —remove-rich-rule, —remove-forward-port, —remove-passthrough [root@ip-11-0-0-239 centos]# firewall-cmd —zone=trusted —remove-source=94.204.104.194/32 success [root@ip-11-0-0-239 centos]# firewall-cmd —list-sources —zone=trusted 94.206.104.194/32 [root@ip-11-0-0-239 centos]# firewall-cmd —list-sources —zone=trusted —permanent [root@ip-11-0-0-239 centos]# firewall-cmd —zone=trusted —add-source=94.206.104.194/32 —permanent success [root@ip-11-0-0-239 centos]# firewall-cmd —zone=trusted —add-port=22/tcp —permanent success [root@ip-11-0-0-239 centos]# firewall-cmd —zone=trusted success [root@ip-11-0-0-239 centos]# firewall-cmd —zone=trusted —list usage: see firewall-cmd man page firewall-cmd: error: ambiguous option: —list could match —list-lockdown-whitelist-contexts, —list-all, —list-lockdown-whitelist-uids, —list-ports, —list-forward-ports, —list-icmp-blocks, —list-interfaces, —list-rich-rules, —list-services, —list-lockdown-whitelist-commands, —list-all-zones, —list-sources, —list-lockdown-whitelist-users [root@ip-11-0-0-239 centos]# firewall-cmd —zone=trusted —list-services, usage: see firewall-cmd man page firewall-cmd: error: unrecognized arguments: —list-services, [root@ip-11-0-0-239 centos]# firewall-cmd —zone=trusted —list-services [root@ip-11-0-0-239 centos]# firewall-cmd —zone=trusted —list-all trusted interfaces: sources: 94.206.104.194/32 services: ports: masquerade: no forward-ports: icmp-blocks: rich rules: [root@ip-11-0-0-239 centos]# firewall-cmd —zone=trusted —add-port=22/tcp success [root@ip-11-0-0-239 centos]# firewall-cmd —zone=trusted —list-all trusted interfaces: sources: 94.206.104.194/32 services: ports: 22/tcp masquerade: no forward-ports: icmp-blocks: rich rules: [root@ip-11-0-0-239 centos]# firewall-cmd —zone=default —list-all Error: INVALID_ZONE: default [root@ip-11-0-0-239 centos]# firewall-cmd —zone=public —list-all public (default) interfaces: sources: services: dhcpv6-client ssh ports: masquerade: no forward-ports: icmp-blocks: rich rules: [root@ip-11-0-0-239 centos]# firewall-cmd —zone=public —remove-port usage: see firewall-cmd man page firewall-cmd: error: argument —remove-port: expected one argument [root@ip-11-0-0-239 centos]# firewall-cmd —zone=public —remove-service=ssh success [root@ip-11-0-0-239 centos]# firewall-cmd —zone=public —list-all public (default) interfaces: sources: services: dhcpv6-client ports: masquerade: no forward-ports: icmp-blocks: rich rules: [root@ip-11-0-0-239 centos]# firewall-cmd usage: see firewall-cmd man page No option specified. [root@ip-11-0-0-239 centos]# firewall-cmd —get-acti trusted sources: 94.206.104.194/32 [root@ip-11-0-0-239 centos]# firewall-cmd —zone=public —remove-service=ssh —permanent success [root@ip-11-0-0-239 centos]# firewall-cmd —reload success [root@ip-11-0-0-239 centos]# firewall-cmd —zone=public —list-all public (default) interfaces: sources: services: dhcpv6-client ports: masquerade: no forward-ports: icmp-blocks: rich rules: [root@ip-11-0-0-239 centos]# firewall-cmd —zone=trusted —list-all trusted interfaces: sources: 94.206.104.194/32 services: ports: 22/tcp masquerade: no forward-ports: icmp-blocks: rich rules:

There are a lot of firewall errors 
out there. Way too many, right?

You as a Sysadmin know that for sure – Lexmark firmware error, Spotify firewall error,
firewall CMD error, OSRS firewall error, Fortnite firewall error or Windows firewall errors.
All these firewall errors sometimes drives you crazy.

Here’s a list of the most common errors around firewalls and the proven solution to them:

  1. Lexmark firmware error 900
  2. Spotify firewall error 17
  3. Windows firewall error 1068
  4. Windows firewall error 0x80070422
  5. Firewall CMD error: Command not Found
  6. OSRS firewall error
  7. Windows firewall error 0x6d9
  8. Fortnite firewall error

And you’ll find the solution to get rid of ALL firewall errors — forever: Test PRTG and get started within minutes!

 1. Lexmark firmware error 900

 Proper fix

Firewall monitoring by PRTG takes care of your network traffic. Get an instant notification as soon as an error occurs. PRTG saves you time and worries!

Learn more about firewall monitoring

 2. Spotify firewall error 17

 Proper fix

Firewall monitoring by PRTG takes care of your network traffic. Get an instant notification as soon as an error occurs. PRTG saves you time and worries!

Learn more about firewall monitoring

 3. Windows firewall error 1068

 Proper fix

Firewall monitoring by PRTG takes care of your network traffic. Get an instant notifications as soon as an error occurs. PRTG saves you time and worries!

Learn more about firewall monitoring

 4. Windows firewall error 0x80070422

 Proper fix

Firewall monitoring by PRTG takes care of your network traffic. Get an instant notifications as soon as an error occurs. PRTG saves you time and worries!

Learn more about firewall monitoring

 5. Firewall CMD error: Command not Found

time blueQuick fix

Firewall-cmd is a command line frontend for firewalld (firewall daemon), a dynamic firewall management tool with D-Bus interface.

It supports IPv4 and IPv6. Additionally, Firewall-cmd supports firewall bridges, zones and ipsets as well. It allows scheduled firewall rules in zones, logs rejected packets, automatically loads kernel modules, and much more.

If a syntax error occurs during execution of the command, the error can occur as follows:

# firewall-cmd -state
usage: see firewall-cmd man page
firewall-cmd: error: unrecognized arguments: -state

# firewall -cmd --state
-bash: firewall: command not found


Best solution:

https://www.thegeekdiary.com/bash-firewall-command-not-found-how-to-resolve-in-centos-rhel-7/

More solutions:

How to Fix “firewall-cmd: command not found” Error in RHEL/CentOS 7

 Proper fix

Firewall monitoring by PRTG takes care of your network traffic. Get an instant notifications as soon as an error occurs. PRTG saves you time and worries!

Learn more about firewall monitoring

6. OSRS firewall error

time blueQuick fix

Some old-school players have encountered the problem with the login error on the PC.  Messages, such as OSRS error loading your profile and Please contact customer service, appear, when trying to log into the game. This problem can happen on both Mac and Windows clients.

Hint:

You could try solving this login problem with the following possible solutions:

  1. This problem can occur when the Internet connection is not strong enough to run the game. Make sure your Internet works normally.
  2. Test your router. Unplug the router for 1 minute, plug it back in and wait for all lights to turn green. Sometimes there may be an ISP problem, so you need to call your ISP to gain further information.
  3. Uninstall older versions of Java & OSRS Client and install the latest version.
  4. Turn off all/any firewalls or disable them. Then retry it.
  5. Restart your computer. Sometimes you may need to completely recover your computer.

Best solution:

https://www.rsorder.com/news/learn-solutions-to-osrs-error-loading-your-profile-login-issue

http://oldschool44.runescape.com/jav_config.ws?userFlow=2346410208033476580

 Proper fix

Firewall monitoring by PRTG takes care of your network traffic. Get an instant notifications as soon as an error occurs. PRTG saves you time and worries!

Learn more about firewall monitoring 

7. Windows firewall error 0x6d9

 Proper fix

Firewall monitoring by PRTG takes care of your network traffic. Get an instant notifications as soon as an error occurs. PRTG saves you time and worries!

Learn more about firewall monitoring

8. Fortnite firewall error

 Proper fix

Firewall monitoring by PRTG takes care of your network traffic. Get an instant notifications as soon as an error occurs. PRTG saves you time and worries!

Learn more about firewall monitoring

Choose your solution: Bugfix or replacement

prtg logo white

With PRTG you’ll never have to deal with
firewall errors again. Ever.

Trusted by 500,000 users and recognized
by industry analysts as a leader

trustpilot preview

“Fantastic network and infrastructure monitoring solution that is easy to deploy and easier still to use. Simply the best available.”

Read more reviews

gartner preview

“Software is absolutely perfect, Support is superior. Meets all needs and requirements, this is a must have solution if you are needing any form of monitoring.”

Read more reviews

pcmag preview

“The tool excels at its primary focus of being a unified infrastructure management and network monitoring service.”

Read more reviews


0

1

Столкнулся с проблемой что не могу настроить

centos

и подключить интернет для внутренней сети virtualbox . Тестирую внутреннею сеть на

fedora

Мой список интерфейсов на centos (роутере)

enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.101  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::a00:27ff:fe25:a22f  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:25:a2:2f  txqueuelen 1000  (Ethernet)
        RX packets 30868  bytes 16512272 (15.7 MiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 15960  bytes 2155263 (2.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 08:00:27:36:dc:83  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.1.1.1  netmask 255.255.255.0  broadcast 10.1.1.255
        inet6 fe80::a00:27ff:fe29:58e1  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:29:58:e1  txqueuelen 1000  (Ethernet)
        RX packets 203  bytes 30172 (29.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 113  bytes 10080 (9.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 4343  bytes 182468 (178.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4343  bytes 182468 (178.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

интерфейс enp0s3 — внешний интерфейс, а enp0s9 для клиентов на роутере

Я убидился что ping работает , как роутер так и клиенты видят друг друга .
После попытался подключить интернет через iptables

iptables -t nat -A POSTROUTING -s 10.1.1.0/24 -j SNAT --to-source=192.168.1.101 

Перелыл интернет по iptables разобрался и нашел статью где настраивают ipables под мою цель
скрипт
но все равно не понял в чем проблема . Первый раз сталкиваюсь с линуксом семейства RedHat поэтому прошу помощи .

P.S

я заметил что когда включаю сервис httpd (apache) я не могу его увидить на других машинах , именно с centos или fedora . Попытался разрешить 80 порт через iptables но результатов 0

 iptables -A INPUT -p tcp --dport 80 -j ACCEPT 

. На основной машине использую ubuntu все прекрасно работает . Также когда пытаюсь сканировать с помощью nmap пишет

  Host seems down. If it is really up, but blocking our ping probes 

Думал что это связано с портом icmp решил разрешить , но это было заблуждением .

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Finale как изменить инструмент
  • Fifa online 4 xigncode system enter error code e0191009
  • Final result installation failed with error code 0x80096005
  • Ffmpeg error codes
  • Fifa crash dump как исправить fifa 13

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии