ERROR: 'Bad interface name' issuing ufw on valid, but non "ethx", interface names
Bug #568877 reported by
Francesco Pretto
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ufw |
Fix Released
|
Undecided
|
Unassigned | ||
ufw (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
Very simple, ufw doesn't accept all valid interface names. The command:
$ sudo ufw allow in on iaslab to any port 67
where "iaslab" is a valid interface name (in complicated environments is useful to rename interfaces semantically), results in:
ERROR: 'Bad interface name'
Solution: ufw should accept any interface name accepted by iptables. If you want something user friendly, ufw should warn at most that the interface is not present (just a warning, not an error). This wasn't my case because the interface "iaslab" was really present, but could help with typing errors.
Version:
$ sudo ufw --version
ufw 0.30pre1-0ubuntu2
Related branches
Changed in ufw: | |
status: | Triaged → Fix Committed |
Changed in ufw: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This is failing due to: r'^[a-zA- Z][a-zA- Z0-9:]* [0-9]', str(name)):
if not re.match(
err_msg = _("Bad interface name")
raise UFWError(err_msg)
You can work around this by adjusting 'iaslab' to be 'iaslab0'.