[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#561359: howto setup a gateway/firewall



Hi Wolfgang,

thanks for picking up this old issue!

On Tue, Feb 14, 2017 at 05:31:04PM +0100, Wolfgang Schweer wrote:
> The documentation could include something like this:

in general: yay, this looks very good!

> #!/bin/sh
> # Turn a system with profile 'Minimal' into a gateway/firewall.
> #
> sed -i 's/auto eth0/auto eth0 eth1/' /etc/network/interfaces

I'd just would explain all commands briefly… eg

# replace all occurrances of "auto eth0" with "auto eth0 eth1" in /etc/network/interfaces:
sed -i 's/auto eth0/auto eth0 eth1/' /etc/network/interfaces

and probably even explain this:

> echo 'address 10.0.0.1' >> /etc/network/interfaces

[...]

> hostname -b gateway
> hostname > /etc/hostname 

definitly the purpose of those as well… :)

> service networking stop
> service networking start
> sed -i 's#NAT=#NAT="10.0.0.0/8"#' /etc/default/enable-nat 
> service enable-nat restart

too :)

> # You might want a firewall (shorewall or ufw) and traffic shaping.
> #apt update
> #apt install shorewall
> # or
> #apt install ufw
> #apt install wondershaper
> 
> The script has been tested to do what it should do, but might be 
> smarter.

I think it's better to give a list of commands, then to provide a script…


-- 
cheers,
	Holger

Attachment: signature.asc
Description: Digital signature


Reply to: