Guest User!

You are not Sophos Staff.

Zebra for ASL

Guys

I realise this would be a totally unsupported extra, but is there any chance you could compile the latest beta of zebra, and stick it in a tarball somewhere?

I'm not sure (don't think it does though) if it requires any specific mods to the kernel

Also, (and my main reason for asking), how much (if any) conflict can I expect between ASL and Zebra?
Parents
  • Hmm ... yes ...

    Or I could just get on top of the last weeks worth of posts, download the pluspack, and build it myself  [:)]

    Ok .. doing that  [:)]

    Wish me luck  [:)]
  • Hi Jon,

    please give us feedback from your zebra compile (im interested in all this routing stuff)!
  • Will do  [:)]

    The intial compile worked (I'm still running 1.8 on that box, but the plus pack seems to have worked)

    We should (hopefully) have a full bgp session up by tonight ... so I'll report back tomorrow (fingers crossed)
  • I'm having problems originating and receiving any tcp/udp sessions on the ASL box ... which is making this a little harder than I'd thought  [:)]

    I can't ssh out from it, and I can't open a tcp connection to port 179 on a next hop machine ...

    I can however telnet to port 179 on the "next hop box" from behind the firewall.

    I'm guessing this is some form of paranoid filters affecting the ASL box directly ... any suggestions where I can find them to "re-educate them"?
  • do you call ssh with the -P (use non-privileged src port) parameter ?

    you can also edit the ssh service definition to include the lower src ports.

    /tom
  • The problem relates to the AUTO_INPUT filters being much stricter than the USR_FORWARD filters.

    What I need to do is modify the filters that are specific to the firewall, to permit tcp/179 bi-directionally on the firewall.

    ssh -P still hangs ... but only when the connections are made FROM the firewall.

    the ASL box (1.825) passes through all the relevant protocols in line with the filter rules, it just doesn't honour the filters when referencing itself.

    I don't know enough about ipchains yet to figure out what changes to make, however I'll be reading the manual tomorrow when i get back to my desk (in about 8 hours  [:)]

    Cheers guys
  • I'm stumped.

    Oct  9 10:40:05 fw kernel: TCP Drop: IN= OUT=eth2 SRC=80.85.76.26 DST=80.85.76.25 LEN=60 TOS=0x00 PREC=0x00 TTL=1 ID=0 PROTO=TCP SPT=33354 DPT=179 WINDOW=5840 RES=0x00 SYN URGP=0 

    fw:/root # telnet 80.85.76.29 179                           
    Trying 80.85.76.29...
    Oct  9 13:21:12 fw kernel: TCP Drop: IN= OUT=eth3 SRC=80.85.76.30 DST=80.85.76.29 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=29485 PROTO=TCP SPT=32798 DPT=179 WINDOW=5840 RES=0x00 SYN URGP=0 
    Oct  9 13:21:15 fw kernel: TCP Drop: IN= OUT=eth3 SRC=80.85.76.30 DST=80.85.76.29 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=29485 PROTO=TCP SPT=32798 DPT=179 WINDOW=5840 RES=0x00 SYN URGP=0 
    Oct  9 13:21:16 fw kernel: TCP Drop: IN= OUT=eth3 SRC=80.85.76.30 DST=80.85.76.29 LEN=60 TOS=0x00 PREC=0x00 TTL=1 ID=59591 PROTO=TCP SPT=32795 DPT=179 WINDOW=5840 RES=0x00 SYN URGP=0 
    Oct  9 13:21:17 fw kernel: TCP Drop: IN= OUT=eth2 SRC=80.85.76.26 DST=80.85.76.25 LEN=60 TOS=0x00 PREC=0x00 TTL=1 ID=1215 PROTO=TCP SPT=32796 DPT=179 WINDOW=5840 RES=0x00 SYN URGP=0 
    Oct  9 13:21:21 fw kernel: TCP Drop: IN= OUT=eth3 SRC=80.85.76.30 DST=80.85.76.29 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=29485 PROTO=TCP SPT=32798 DPT=179 WINDOW=5840 RES=0x00 SYN URGP=0

    /usr/local/httpd/htdocs/_show_iptables_filter.pl 
    Chain INPUT (policy DROP)
    target     prot opt source               destination         
    LOCAL      all  --  0.0.0.0/0            0.0.0.0/0          
    FIX_CONNTRACK  all  --  0.0.0.0/0            0.0.0.0/0          
    AUTO_INPUT  all  --  0.0.0.0/0            0.0.0.0/0          
    TTT_ACCEPT  all  --  0.0.0.0/0            0.0.0.0/0          
    LOGDROP    all  --  0.0.0.0/0            0.0.0.0/0          

    Chain FORWARD (policy DROP)
    target     prot opt source               destination         
    LOCAL      all  --  0.0.0.0/0            0.0.0.0/0          
    FIX_CONNTRACK  all  --  0.0.0.0/0            0.0.0.0/0          
    AUTO_FORWARD  all  --  0.0.0.0/0            0.0.0.0/0          
    USR_FORWARD  all  --  0.0.0.0/0            0.0.0.0/0          
    LOGDROP    all  --  0.0.0.0/0            0.0.0.0/0          

    Chain OUTPUT (policy DROP)
    target     prot opt source               destination         
    LOCAL      all  --  0.0.0.0/0            0.0.0.0/0          
    FIX_CONNTRACK  all  --  0.0.0.0/0            0.0.0.0/0          
    AUTO_OUTPUT  all  --  0.0.0.0/0            0.0.0.0/0          
    TTT_ACCEPT  all  --  0.0.0.0/0            0.0.0.0/0          
    LOGDROP    all  --  0.0.0.0/0            0.0.0.0/0          

    Chain AUTO_FORWARD (1 references)
    target     prot opt source               destination         
    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0          
    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0          state RELATED,ESTABLISHED 

    Chain AUTO_INPUT (1 references)
    target     prot opt source               destination         
    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0          
    LOGDROP    tcp  --  0.0.0.0/0            0.0.0.0/0          tcp spts:1024:65535 dpt:25 
    ACCEPT     tcp  --  194.159.102.0/24     0.0.0.0/0          tcp dpt:22 
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0          tcp dpt:22 
    LOGDROP    tcp  --  0.0.0.0/0            0.0.0.0/0          tcp dpt:22 
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0          tcp spts:1024:65535 dpt:443 
    LOGDROP    tcp  --  0.0.0.0/0            0.0.0.0/0          tcp spts:1024:65535 dpt:443 
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0          tcp dpt:53 
    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0          udp dpt:53 
    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0          state RELATED,ESTABLISHED 

    Chain AUTO_OUTPUT (1 references)
    target     prot opt source               destination         
    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0          
    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0          state RELATED,ESTABLISHED 

    Chain FIX_CONNTRACK (3 references)
    target     prot opt source               destination         

    Chain LOCAL (3 references)
    target     prot opt source               destination         
    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0          
    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0          

    Chain LOGDROP (7 references)
    target     prot opt source               destination         
    LOG        tcp  --  0.0.0.0/0            0.0.0.0/0          LOG flags 0 level 6 prefix `TCP Drop: ' 
    LOG        udp  --  0.0.0.0/0            0.0.0.0/0          LOG flags 0 level 6 prefix `UDP Drop: ' 
    LOG        esp  --  0.0.0.0/0            0.0.0.0/0          LOG flags 0 level 6 prefix `ESP Drop: ' 
    LOG        ah   --  0.0.0.0/0            0.0.0.0/0          LOG flags 0 level 6 prefix `AH Drop: ' 
    LOG        icmp --  0.0.0.0/0            0.0.0.0/0          LOG flags 0 level 6 prefix `ICMP Drop: ' 
    LOG        all  -f  0.0.0.0/0            0.0.0.0/0          LOG flags 0 level 0 prefix `FRAG Drop: ' 
    DROP       all  --  0.0.0.0/0            0.0.0.0/0          

    Chain TTT_ACCEPT (2 references)
    target     prot opt source               destination         
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0          tcp spts:1024:65535 dpt:21 
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0          tcp spts:1024:65535 dpt:25 
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0          tcp spts:1024:65535 dpt:53 
    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0          udp spts:1024:65535 dpt:53 
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0          tcp spts:1024:65535 dpt:8080 
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0          tcp spts:1024:65535 dpt:80 
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0          tcp spts:1024:65535 dpt:443 
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0          tcp spts:1:65535 dpt:222 
    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0          udp spts:1024:65535 dpts:33000:34000 
    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0          icmp type 11 code 0 
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0          tcp spts:1024:65535 dpt:113 
    ACCEPT     tcp  --  80.85.76.24/30       80.85.76.26        tcp spts:1024:65535 dpt:179 
    ACCEPT     all  --  80.85.76.28/30       80.85.76.30        
    LOGDROP    all  --  0.0.0.0/0            0.0.0.0/0          

    Chain USR_FORWARD (1 references)
    target     prot opt source               destination         
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0          tcp dpt:22 
    ACCEPT     all  --  194.70.36.0/24       0.0.0.0/0          
    ACCEPT     all  --  192.168.250.0/24     0.0.0.0/0          
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.7        tcp dpt:53 
    ACCEPT     udp  --  0.0.0.0/0            194.70.36.7        udp dpt:53 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.10       tcp spts:1024:65535 dpt:80 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.21       tcp spts:1024:65535 dpt:80 
    ACCEPT     tcp  --  0.0.0.0/0            194.159.102.135    tcp spts:1024:65535 dpt:80 
    ACCEPT     tcp  --  0.0.0.0/0            195.224.237.13     tcp spts:1024:65535 dpt:80 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.2        tcp spts:1024:65535 dpt:80 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.10       tcp spts:1024:65535 dpt:80 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.10       tcp spts:1024:65535 dpt:443 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.10       tcp spts:1024:65535 dpt:143 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.10       tcp spts:1:65535 dpt:993 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.10       tcp dpt:389 
    ACCEPT     udp  --  0.0.0.0/0            194.70.36.10       udp dpt:389 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.10       tcp dpt:636 
    ACCEPT     udp  --  0.0.0.0/0            194.70.36.10       udp dpt:636 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.10       tcp spts:1024:65535 dpt:110 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.10       tcp spts:1024:65535 dpt:25 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.21       tcp spts:1024:65535 dpt:80 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.21       tcp spts:1024:65535 dpt:443 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.21       tcp spts:1024:65535 dpt:143 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.21       tcp spts:1:65535 dpt:993 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.21       tcp dpt:389 
    ACCEPT     udp  --  0.0.0.0/0            194.70.36.21       udp dpt:389 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.21       tcp dpt:636 
    ACCEPT     udp  --  0.0.0.0/0            194.70.36.21       udp dpt:636 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.21       tcp spts:1024:65535 dpt:110 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.21       tcp spts:1024:65535 dpt:25 
    ACCEPT     tcp  --  0.0.0.0/0            194.159.102.135    tcp spts:1024:65535 dpt:80 
    ACCEPT     tcp  --  0.0.0.0/0            194.159.102.135    tcp spts:1024:65535 dpt:443 
    ACCEPT     tcp  --  0.0.0.0/0            194.159.102.135    tcp spts:1024:65535 dpt:143 
    ACCEPT     tcp  --  0.0.0.0/0            194.159.102.135    tcp spts:1:65535 dpt:993 
    ACCEPT     tcp  --  0.0.0.0/0            194.159.102.135    tcp dpt:389 
    ACCEPT     udp  --  0.0.0.0/0            194.159.102.135    udp dpt:389 
    ACCEPT     tcp  --  0.0.0.0/0            194.159.102.135    tcp dpt:636 
    ACCEPT     udp  --  0.0.0.0/0            194.159.102.135    udp dpt:636 
    ACCEPT     tcp  --  0.0.0.0/0            194.159.102.135    tcp spts:1024:65535 dpt:110 
    ACCEPT     tcp  --  0.0.0.0/0            194.159.102.135    tcp spts:1024:65535 dpt:25 
    ACCEPT     tcp  --  0.0.0.0/0            195.224.237.13     tcp spts:1024:65535 dpt:80 
    ACCEPT     tcp  --  0.0.0.0/0            195.224.237.13     tcp spts:1024:65535 dpt:443 
    ACCEPT     tcp  --  0.0.0.0/0            195.224.237.13     tcp spts:1024:65535 dpt:143 
    ACCEPT     tcp  --  0.0.0.0/0            195.224.237.13     tcp spts:1:65535 dpt:993 
    ACCEPT     tcp  --  0.0.0.0/0            195.224.237.13     tcp dpt:389 
    ACCEPT     udp  --  0.0.0.0/0            195.224.237.13     udp dpt:389 
    ACCEPT     tcp  --  0.0.0.0/0            195.224.237.13     tcp dpt:636 
    ACCEPT     udp  --  0.0.0.0/0            195.224.237.13     udp dpt:636 
    ACCEPT     tcp  --  0.0.0.0/0            195.224.237.13     tcp spts:1024:65535 dpt:110 
    ACCEPT     tcp  --  0.0.0.0/0            195.224.237.13     tcp spts:1024:65535 dpt:25 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.2        tcp spts:1024:65535 dpts:20:21 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.10       tcp spts:1024:65535 dpts:20:21 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.21       tcp spts:1024:65535 dpts:20:21 
    ACCEPT     tcp  --  0.0.0.0/0            194.159.102.135    tcp spts:1024:65535 dpts:20:21 
    ACCEPT     tcp  --  0.0.0.0/0            195.224.237.13     tcp spts:1024:65535 dpts:20:21 
    ACCEPT     tcp  --  0.0.0.0/0            194.70.36.2        tcp spts:1024:65535 dpts:20:21 
    fw:/root # 

    Yet I have
  • Have you gotten Zebra to work? I have it running, but can't get OSPF updates. I am trying to figure out the right firewall rules. Somewhere I read that the protocol was IP 89 and multicast network 224.0.0.5/32 and 224.0.0.6/32. I'd like to post a howto once I get this up and running. Thanks for all the help. 

    ~David
  • I'd like to say I got it working, but to be honest I gave up in the end ... reformatted the machine with OpenBSD 3.0 and installed a set of pf filters, squid, and wrote a few scripts.

    I don't have a snazzy web interface, but at least I have something that I managed to get working  how I needed it to in approx 1.5 hours from start to finish.
  • Oh c'mon. There has to be a hacker out there who is doing this. Let's collaberate and get this done! :-)
  • I think I figured out what the problem is. Running a netstat -g gives the following output

    netstat: no support 'AF INET (igmp)'

    The kernel does not have IP multicast routing support enabled. If we can get the Astaro folks to release a kernel that has this enabled, we should be able to bind 224.0.0.5/32 and 224.0.0.6/32 to lo. Then we can run zebra and ospfd should start getting routing updates from its neighbors. 


    Has anyone recompiled the Astaro kernel? I want to test this and maybe if I recompile my own kernel I can verify that this works. 

    ~David
  • Hi all,

    i enabled IP Multicast routing in kernel for the BETA snapshot 3.020 - plz checkout and test.
    Thx a lot for your testing and hacking!
Reply Children
  • Thx, 

    I will let you all know as soon as I install. Are there any known issues with the BETA? I am looking to go PROD with it, if it works with OSPF. 

    Happy Holidays!

    ~David
  • Markus, 

    I have a favor to ask. Would you be able to recompile the 3.0 beta with IPIP support in the kernel? I am finding that I also need this to do IP multicast routing. There should be an option to enable routing protocols DVRMP, MOSPF, PIMv1 and PIMv2. It looks like the IGMP only enabled multicasting, but IPIP does the actual multicast routing. 

    Thanks, 

    ~David
  • Guys, this is getting really frustrating. Well this is what I have so far. 

    1. Dnloaded pluspack

    http://docs.astaro.org/hacking/pluspack/asl-pluspack-1.01.tar.gz

    2. Dnload source for Zebra. http://www.zebra.org/download.html

    2. Enable ssh on Astaro box

    3. scp from another Linux box and dump files

    scp filename loginuser@ip_address:/tmp

    4. ssh to astaro box

    ssh loginuser@ip_address

    5. Login as su

    su -

    6. Change to /tmp

    cd /tmp

    7. Move files to /var/chroot-report

    mv filename /var/chroot-report

    8. Extract pluspack

    tar -xzvf filename

    9. Change to extracted pluspack folder

    cd 'pluspack_folder'

    10. Run install

    ./install.pl

    11. Logout and log back in as su -

    12. Extract zebra from /var/chroot-report

    tar -xzvf 'filename.tar.gz'

    13. Change to extracted directory

    14. Run ./configure

    15. Run make

    16. Run make install 

    17. link or copy ospfd and zebra to /usr/bin

    18. Copy /usr/local/etc/zebra.conf.sample to zebra.conf, do the same to ospfd.conf. Leave in that directory.

    19. Edit /etc/services and add the following lines

    zebrasrv 2600/tcp # zebra service
    zebra 2601/tcp # zebra vty
    ripd 2602/tcp # RIPd vty
    ripngd 2603/tcp # RIPngd vty
    ospfd 2604/tcp # OSPFd vty
    bgpd 2605/tcp # BGPd vty
    ospf6d 2606/tcp # OSPF6d vty

    20. Log out and log back in as su -

    21. Run zebra

    zebra -d

    22. Run ospfd

    ospfd -d

    23. Configure ospfd

    telnet ip_address 2604

    ospfd>enable

    ospfd#configure terminal

    ospfd#router ospf

    ospfd#network 0.0.0.0/0 area 0

    ospfd#exit 'x2'

    ospfd# wr mem

    Well this as far as I could get. I couldn't go past this as I keep getting the error message sendto ospf_write operation not permitted. The ospfd cannot joing the allsf and dr multicast groups. I haven't been able to figure out what the deal is here. I am running on Redhat linux 7.2 and it is working fine and talking to all the neighbors. If anyone has a solution, please post. 

    An odd thing I noticed is that running netstat -g does not give me all-mcast and dr group memberships. It comes back with 224.0.0.1. I wonder if this is because mutlicast routing is not enabled in the kernel?

    Thanks in advance for all the help.

    ~David
  • I really need to get some kind of feedback from some hackers that know how to do enable multicast routing in a Linux kernel. Thanks in advance for all the help. 

    David
  • David  

    I know that I am new to this forum, but I am not that new to networking.

    Why are you wanting to turn this fine firewall into a router.  I strongly believe that the Astaro should remain a firewall.  Leaving the routing and routing protocols to the routers.  To solve your problem simply put a router like a Cisco in front of the Astaro and let it handle the routing updates. Use OSPF on the interface where needed and static routes to the Astaro. 

    Any good firewall design would include the outside router -- firewall -- inside router.

    ---

    This is just my opinion, I could be wrong.  [:)]
  • Linux use to be a hackers tool. I guess this is going to set the standard for proprietary kernel designs and break the open source's efforts to allow us to define what we want to have the capability to do with our kernels. How can you permit and block multicast trafiic if you can't route it? The server is already doing virus scanning, DNS proxy, masquerading and some routing. It be nice to enchance the features.
  • Craig....

    First of all I agree with you to some extent, but...
    As you might know some of us would like failover functionality from the ASL, this in order to keep the single point of failure away. If you put a cisco router in front then you'd have a single point of failure.
    BGP is also an other nice thing to support by ASL.
    Tha ASL has potential of becomeing the best failover security device "ever known to the community",
    Please also read my post regarding VRRPD.

    Thanks...Espen
  • PS.....

    ASL is secutrity linux and does not state that it's a pure firewall only solution...it will soon contain a DHCPD as well as much more ( I hope).

    Btw. thanks 4 a great product that seems to be getting better all the time.

    Brgds. Espen
  • Astaro development team, any comments on this issue? Will this be supported in the new kernel. It works fine on Redhat Linux 7.x and Slackware. Thanks for all the help and good work!