# How can I tell which firewall I'm using?



## paulbot75 (Jul 22, 2009)

Hi all,

I'm using freebsd 7.2 vanilla install

I'm a complete bsd newbie.  I'm having trouble connecting to sendmail on anything but the local host.  Sockstat -4 shows:

root sendmail ... 127.0.0.1:25

When I nmap from another host on the lan I don't see an entry for port 25 (I do see 110,143).

I'm assuming that a firewall is blocking the port.  I understand that there are a variety of FreeBSD firewalls available.  How do I tell what firewall I'm running?

Cheers,


----------



## DutchDaemon (Jul 22, 2009)

Vanilla installs don't run firewalls. You're running Sendmail on localhost, which means it's not accessible from the outside. In order to have Sendmail listening on your external interface, you'll need to add 'sendmail_enable="YES"' to /etc/rc.conf and run [cmd=]/etc/rc.d/sendmail start[/cmd].

See also:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/sendmail.html
http://www.freebsd.org/cgi/man.cgi?query=sendmail&sektion=8
http://oreilly.com/catalog/9780596510299/


----------



## SirDice (Jul 22, 2009)

Sendmail is only listening on the localhost interface lo0. You cannot access this interface from outside the host.


----------



## bb (Jul 22, 2009)

paulbot75 said:
			
		

> When I nmap from another host on the lan I don't see an entry for port 25 (I do see 110,143).



A nice tip: Use the following command on FreeBSD


```
sockstat -46l
```

before running nmap from another host. It will give you a better idea of what could actually be found by nmap.


----------



## DutchDaemon (Jul 22, 2009)

Or sockstat -46 if you don't want to be confused by localhost ..


----------



## paulbot75 (Jul 22, 2009)

I've found the problem... but I have no idea how to fix it.  The problem is that sendmail is crashing shortly after it starts:


```
NOQUEUE: SYSERROR(root): opendaemonsocket: daemon IPv4 cannot bind: Address already in use

NOQUEUE: SYSERROR(root): opendaemonsocket: daemon server SMTP socket wedged: exiting
```

I know this is no longer a firewall issue... but any thoughts?


----------



## bb (Jul 22, 2009)

did you try


```
/etc/rc.d/sendmail restart
```

?


----------



## SirDice (Jul 23, 2009)

paulbot75 said:
			
		

> I've found the problem... but I have no idea how to fix it.  The problem is that sendmail is crashing shortly after it starts:
> 
> 
> ```
> ...



It doesn't crash. It complains there's already something that opened port 25.


----------

