open iptables to connect as client to windows network

NoOp glgxg at sbcglobal.net
Thu May 24 23:20:03 UTC 2012


On 05/24/2012 02:35 PM, Tom H wrote:
> On Thu, May 24, 2012 at 3:44 PM, NoOp <glgxg at sbcglobal.net> wrote:
...
>> If you want to allow samba from any network:
>>
>> $ sudo ufw allow samba
>> Rule added
>>
>> $ sudo ufw status verbose
>> Status: active
>> Logging: on (low)
>> Default: deny (incoming), allow (outgoing)
>> New profiles: skip
>>
>> To                         Action      From
>> --                         ------      ----
>> 137,138/udp (Samba)        ALLOW IN    Anywhere
> 
> These ufw commands will result in the same iptables rules but they're
> certainly simpler to type!

Yep.

> 
> (Did you miss a line in your last copy-and-paste?)
> 

Nah. I failed to show how to remove:
137,138/udp (Samba)        ALLOW IN    192.168.1.0/24
139,445/tcp (Samba)        ALLOW IN    192.168.1.0/24
before allowing samba from anywhere.

$ sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing)
New profiles: skip

To                         Action      From
--                         ------      ----
137,138/udp (Samba)        ALLOW IN    192.168.1.0/24
139,445/tcp (Samba)        ALLOW IN    192.168.1.0/24
137,138/udp (Samba)        ALLOW IN    Anywhere
139,445/tcp (Samba)        ALLOW IN    Anywhere

$ sudo ufw status numbered
Status: active

     To                         Action      From
     --                         ------      ----
[ 1] Samba                      ALLOW IN    192.168.1.0/24
[ 2] Samba                      ALLOW IN    Anywhere

$ sudo ufw delete 1
Deleting:
 allow from 192.168.1.0/24 to any app Samba
Proceed with operation (y|n)? y
Rule deleted

$ sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing)
New profiles: skip

To                         Action      From
--                         ------      ----
137,138/udp (Samba)        ALLOW IN    Anywhere
139,445/tcp (Samba)        ALLOW IN    Anywhere






More information about the ubuntu-users mailing list