Help in setting Firewall (ufw)

scott redhowlingwolves at nc.rr.com
Sun Jan 18 08:34:12 UTC 2009


Knute Johnson wrote:
> Roy M. wrote:
>> Hello,
>>
>> Can anyone help me to translate my requests below to ufw commands...
>>
>> 1. Block all access to server, except port 80 from public
>> 2. Enable ssh access (listening on port 8900), from IP range
>> 202.192.010.002 to 202.192.010.007
>>
>> THx...
>>
>
> If this shows up twice, I apologize. Something is amiss in my mail program.
>
> sudo ufw enable
>
> sudo ufw allow 80/tcp
>
> sudo ufw allow proto tcp from 202.192.10.2 to any port 8900
> sudo ufw allow proto tcp from 202.192.10.3 to any port 8900
> .4
> .5
> etc
>
> You have to do these separately as there is no way to do just the few
> you want with one command.
>
Or simply learn Ip tables. Man IPTables is a great start.

The really lazy can use arno's firewall and study it's syntax. Oh
yeah, it's arno-iptables-firewall for the junior people. A really good
start.

Scott





More information about the ubuntu-users mailing list