防火墙-我需要允许通过Centos 7路由器/ NAT防火墙从外部网络到内部网络的流量

时间:2020-04-17 08:27:19

标签: firewalld

我有一个内部专用VLAN(192.168.100.x / 24)和一个外部VLAN(10.x.x.x / 16)。外部VLAN已路由到Internet。

我正在使用带有nics的Centos VM,这两个vlan都可以充当路由器,并通过伪装使内部vm流量到达外部。

我需要从10.x.x.x开始的一些VM才能访问和访问192.168.100.x上的服务。他们将拥有这些VM的IP,并可以通过所述Centos路由器路由到内部网络。

我发现ping是从外部(10.x.x.x)到内部,但ssh无法正常工作。

有没有一种方法可以在不使用直接iptable命令的情况下在firewall-cmd中本地实现?

我有以下活动区域。

    [root@centos ~]# firewall-cmd --list-all --zone=masqerade
masqerade (active)
  target: default
  icmp-block-inversion: no
  interfaces: eth0
  sources: 
  services: 
  ports: 
  protocols: 
  masquerade: yes
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 

[root@centos ~]# firewall-cmd --list-all --zone=pcallow
pcallow (active)
  target: default
  icmp-block-inversion: no
  interfaces: 
  sources: 10.134.87.69
  services: ssh
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 

[root@centos ~]# firewall-cmd --list-all --zone=internal
internal (active)
  target: default
  icmp-block-inversion: no
  interfaces: eth1
  sources: 
  services: ssh mdns samba-client dhcpv6-client
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 

当前情况:

    firwall / router / natVM上的
  1. eth0是公用的,而eth1是连接到专用网络的nic
  2. 从内部可以到达外部Internet-确定
  3. Centos VM可以插入内部VM-确定
  4. 我已锁定路由器-只有iP 10.134.87.69可以SSH路由-好的
  5. 我需要从10.134.87.69(和其他一些IP)SSH到内部网络中的VM,这是没有发生的。

我在这里看到了答案-但我想知道是否有一种方法不使用直接iptables命令:

https://serverfault.com/questions/835246/centos-7-router-firewalld

0 个答案:

没有答案
相关问题