고정 IP 주소와 방화벽을 갖춘 Linux 브리지 네트워크

고정 IP 주소와 방화벽을 갖춘 Linux 브리지 네트워크

모든 도움에 감사드립니다. 내 설정을 설정하려고 합니다.네트워크 맵인터페이스 파일 설정에 대한 조언을 주실 수 있나요? 동일한 게이트웨이의 PLC에 고정 IP를 설정하면 인터페이스에서도 설정할 필요가 없겠죠? 어떤 이유로 eth5,6에 고정 IP 주소를 설정하면 eth4(br0)에서 인터넷을 얻을 수 없습니다. 내 방화벽 설정이 올바른가요? eth5 및 eth6에서 내 네트워크(eth4)의 MAC 주소를 계속 볼 수 있기 때문입니다. 패널 1~4에 자체 네트워크가 있기를 원합니다.

내/etc/네트워크/인터페이스

# Bridge and Switch

auto lo
iface lo inet loopback

# eth4 to eth6 network switch
allow-hotplug eth4
iface eth4 inet manual
    pre-up ifconfig $IFACE up
    pre-down ifconfig $IFACE down
allow-hotplug eth5
iface eth5 inet manual
    pre-up ifconfig $IFACE up
    pre-down ifconfig $IFACE down
allow-hotplug eth6
iface eth6 inet manual
    pre-up ifconfig $IFACE up
    pre-down ifconfig $IFACE down

# Setup IP address of bridge
auto br0
iface br0 inet dhcp
        bridge_ports eth4 eth5 eth6

#######################################################################
# Bridge Firewall
# eth1 is the connection from the customer

# allows connection tracking support, needed
modprobe ip_conntrack
modprobe ip_conntrack_ftp

# enables connection tracking, needed
iptables -I FORWARD -m state --state INVALID -j DROP
iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT

# allows all outbound traffic
iptables -A FORWARD --in-interface eth4 --out-interface eth5 -j ACCEPT
iptables -A FORWARD --in-interface eth4 --out-interface eth6 -j ACCEPT

# disallow inbound traffic
iptables -A FORWARD --in-interface eth5 --out-interface eth4 -j REJECT
iptables -A FORWARD --in-interface eth6 --out-interface eth4 -j REJECT

관련 정보