How to allow all traffic on a local interface using UFW?

Server Fault Asked on January 12, 2021

I’ve got Apache running as a reverse proxy for another Docker service. I got it working but as soon as I enable UFW, all connections are blocked with this error message:

Dec 29 23:50:23 vps520941 kernel: [2870586.522706] [UFW BLOCK] IN= OUT=br-xxxxxxxxx SRC= DST= LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=38755 DF PROTO=TCP SPT=54620 DPT=22300 WINDOW=292

And this is the result of ifconfig:

br-xxxxxxxxx Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx
          inet addr:  Bcast:  Mask:
          RX packets:22 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1630 (1.6 KB)  TX bytes:2896 (2.8 KB)

Previously I had try to allow traffic on my network interface IP, however it changes on each reboot so that doesn’t work.

I had something like this in ufw: ufw allow in from to any port but of course that doesn’t work anymore since the interface IP is now

So I’m wondering, is it possible to tell UFW to allow all connections, not based on IP, but based on the network interface name?

One Answer

It was right in the man page with numerous examples: on <interface>.


ufw allow on <interface> to any

Answered by Michael Hampton on January 12, 2021

Add your own answers!

Related Questions

Forge UDP checksum

1  Asked on November 4, 2021 by wullxz


FFMPEG Install on EC2 – Amazon Linux

4  Asked on November 4, 2021 by oliver-holmberg


How to install Asterisk with SRTP support?

3  Asked on November 4, 2021 by justlogin


CentOS 6.0 only shows loopback address with ifconfig

2  Asked on November 4, 2021 by nakiya


Working with array of object in Zabbix

1  Asked on November 4, 2021 by yury


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir