Folks -

New round these parts (though not to firewalls), so please bear with any
stoopid questions.

I'm setting up Shorewall on a Linux Mint box in order to isolate a
Raspberry Pi farm in a school, allowing access by ssh and vnc from
school PCs and the Pis to access the Internet for updates and package
downloads. Pretty much all else unnecessary is blocked. After a fairly
thrilling scramble up the learning curve it all seems to work and just
needs validating and tidying up. One or two questions have arisen on the
way though:

1. I'm using DNAT to map the Pi ip addresses (on their own private
subnet) onto addresses on the school network. I did something logically
similar some years ago for a completely different application, which I
did with static NAT on a Cisco PIX. In that case, the PIX determined
that it had an interest in those pre-NATted ip addresses and responded
to ARP requests for them just as part of the day job. I vaguely assumed
the same would happen here until I realised I'd probably have to
explicitly add the pre-NATted ip addresses to the outer interface, which
I did by hand. Question: would Shorewall have done that for me if I'd
been a bit more patient? Maybe I went ahead before I'd got Shorewall to
understand where I was going with this.

2. I'd like to parameterise this where I can to facilitate reuse in
other schools if it turned out to be useful. I've just stumbled across
the params file, which I don't remember seeing on my way up the learning
curve, but on the face of it, it only appears to allow parameterisation
of complete lexical items. But having done a bit of shell and Perl in my
time I was tempted to try:
    Schoolnet=172.16.1
    Pinet=192.168.1
and in my rules, brandish something like:
    DNAT    skool    pinet:${Pinet}.1    tcp    ssh    ${Schoolnet}.129
(There will need to be a number of such lines.) It seems to work. Am I
playing with fire?

3. Is there a more succinct way of performing a linear mapping of one
block of ip addresses onto another, rather than repeated lines as above?
I thought I could map one CIDR range onto another with the PIX, but my
memory is a bit hazy from more than 10 years ago.

4. Changing DROP to REJECT quickly found my last bug, but I never got
logging to work. I created /var/log/messages in order to eliminate an
error, but putting debug in the LOG LEVEL field of the policy file
didn't do anything. In fact, I've never had anything  beyond the startup
message in /var/log/messages. I've never had occasion to more than
scratch the surface of syslog so this may be a silly question. Is there
something I'm missing?

Anyway, great work Tom. Having quickly dismissed gufw and geared myself
up if necessary to fight with raw iptables, you've saved me a lot of work!

Best regards - Philip


------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to