Find the answer to your Linux question:
Results 1 to 8 of 8
Hello everybody, I have a problem when deploy Snort and iptables on vmware. Here is my network topo: 0d207625be78ed6b34c6c9e9dc80ed12_43342086.mang.jpg The problem is : how to let snort Server can connect ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    11

    How to create a Bridged Firewall with Centos with Vmware


    Hello everybody,
    I have a problem when deploy Snort and iptables on vmware.
    Here is my network topo:

    0d207625be78ed6b34c6c9e9dc80ed12_43342086.mang.jpg
    The problem is :
    how to let snort Server can connect to internet
    i set default gateway on snort server to 192.168.1.2(br0 of Firewall)

    Please help me.
    Thanks in advanced

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    In your diagram you have the gateway as being 192.168.1.1, 192.168.1.2 is not the gateway it is just the bridge.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Apr 2011
    Posts
    11
    Thanks Robert,
    I have pointed the gateway to modem ip.But i have another problem.
    I can connect to internet from Lan.But how to let Iptables Firewall to handle the packet come from inside and outside.
    In this case , i have use some rule to block all traffic come in and come out like:
    PHP Code:
    iptables -F
    iptables 
    -P INPUT DROP
    iptables 
    -P OUTPUT DROP
    iptables 
    -P FORWARD DROP 
    But from LAN i still connect to internet,Firewall did not do anything.
    I know a bridged firewall is a firewall that operates at layer 2.
    So what do i do to handle packet come in and come out?

    Please help me

  4. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Is this the only thing you have setup in the firewall?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  5. #5
    Just Joined!
    Join Date
    Apr 2011
    Posts
    11
    No,I use those rules just for testing only.
    I just want to block or accept packet come through my iptables Firewall.
    But iptables can not deal with packet(Bridged-Layer 2) in this diagram.
    How do i have to do to resove this matter?
    Could you please give me some documents about this matter?
    Thanks

  6. #6
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    If you want to use a bridge then you should be looking at ebtables instead of iptables.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  7. #7
    Just Joined!
    Join Date
    Apr 2011
    Posts
    11
    Hi,
    Thanks for your reply.
    I have discovered that ebtables is a far more powerful interface for manipulating traffic at Layer 2.
    However i just want to deploy a transparent firewall( iptables) to control traffic at layer 3 for drop,accept ... ip src,ip dest...

    And another important thing is NAT on this transparent firewall.
    When we deploy transparent firewall, i think i can only use rule FORWARD.So how about the matter if i want to nat ?
    Please help me solve this matter.
    Last edited by lamletoi; 04-15-2012 at 04:03 PM.

  8. #8
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    You have to decide if you want bridging or routing.

    Bridging you use ebtables
    Routing you use iptables

    I do not know much about ebtables as I do not use bridging.
    If you are looking to control Layer 3 then you should switch to routing.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •