Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Shorewall and Webmin 1.380 setup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
marrowhk
Apprentice
Apprentice


Joined: 25 Jul 2007
Posts: 250

PostPosted: Sun Dec 16, 2007 9:39 am    Post subject: Shorewall and Webmin 1.380 setup Reply with quote

HOWTO: Setup shorewall and control it with webmin 1.38

===========================================

webmin 1.38 contains the shorewall module by default (portage uses webmin-1.37.x)

What we'll be doing:

Emerging shorewall and setting up the firewall then emerging webmin-1.380 and fine tuning shorewall via webmin

===========================================

FIREWALL

1. #emerge shorewall shorewall-common shorewall-shell shorewall-perl

2. edit your shorewall setup

    ###MYSHOREWALL SETUP###

    [ INTERNET --> ISP-BROADBAND-MODEM --> ROUTER --> PC ]

    /etc/shorewall/zones
    Code:
    fw firewall
    net ipv4


    /etc/shorewall/interfaces
    Code:
    net eth0 detect routefilter,logmartians,nosmurfs,tcpflags,blacklist


    /etc/shorewall/policy
    Code:
    $FW net ACCEPT
    net all DROP info
    all all DROP info


    /etc/shorewall/shorewall.conf
    Code:
    STARTUP_ENABLED=Yes


3. Check shorewall configuration and start up.

Code:
#shorewall check

#eselect rc add shorewall default

#eselect rc start shorewall



WEBMIN


4. Create overlay for webmin, edit the ebuild and emerge webmin

Code:
# mkdir /usr/local/portage/app-admin

# cp -Rf /usr/portage/app-admin/webmin /usr/local/portage/app-admin

# cd /usr/local/portage/app-admin/webmin

# cp webmin-1.370-r1.ebuild webmin-1.380.ebuild

# nano -w webmin-1.380.ebuild   (SEE THE CHANGES BELOW)

# ebuild webmin-1.380.ebuild digest

        EBUILD CHANGES: change the ebuild header and comment-out the postfix patch

      Code:
      # $Header: /var/cvsroot/gentoo-x86/app-admin/webmin/webmin-1.380.ebuild $
      # epatch "${FILESDIR}"/${PN}-1.300-postfix.patch

5. #emerge webmin

Code:
#eselect rc add webmin default

#eselect rc start webmin


6. Change default webmin password

Code:
#/usr/libexec/webmin/changepass.pl /etc/webmin root XXXX


7. Login to webmin (login and password = root : XXXX)


8. Checkout the shorewall settings

    After logging in go to Networking / Shoreline Firewall and the fun starts!


===============================================

:wink: I love the new webmin set-up pf 1.38, it's a massive step up from 1.37. Hope this is helpful until portage ups to 1.38. :roll:

===============================================
_________________
You'll always come back to GENTOOOOOOO ! (Trust me...)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum