# ipfw allow port for 1 ip



## iMer (May 24, 2010)

hello
i want to allow 80.79.127.3 to connect on 80.79.127.2 port 1001 tcp
only 80.79.127.2 has a firewall (ipfw)

```
$IPF 110 allow tcp from 80.79.127.3 to any 1001 in
$IPF 120 allow tcp from 80.79.127.3 to any 1001 out
```
this does not work
so i changed it a little:

```
$IPF 110 allow tcp from 80.79.127.3 to any 1001 in
$IPF 120 allow tcp from 80.79.127.3 to any 1001 out
$IPF 115 allow tcp from any to 80.79.127.3 1001 in
$IPF 125 allow tcp from any to 80.79.127.3 1001 out
```
this does not work too
if i change 80.79.127.3 to any i works but all other hosts are able to connect on that port

any ideas?


----------



## phoenix (May 25, 2010)

```
ipfw add 110 allow tcp from 80.79.127.3 to 80.79.127.2 1001 in recv <nicname>
ipfw add 120 allow tcp from 80.79.127.2 1001 to 80.79.127.3 out xmit <nicname> established
```


----------

