Volumio 2 : Changin web UI default port

Hi all,
I would like to change the default port 80 of the UI because I need it for another application installed on my pi3 requesting port 80 (pi-hole, an amazing ads filter).

On Volumio 2 , I wasn’t able to find were http port could be changed .

Sorry , I am maybe in the wrong thread. Can someone can tell me how getting the answer ?

RTFM is a valid answer :smiley:

Personally, i wouldn’t run Volumio and Pi-Hole on the same Pi.

Volumio2 is a node.js application that also uses express.js. I don’t know exactly how to reconfigure it to use a new port but pretty sure a quick google will throw up the right answer.

Okay,
thanks, I know it is not recommended , but this is really working and audio is fine , no gliches , no quality issues when running pi-holes…

After some time , I found and succeed to change the port… But something refuse any connection on port 80 , rejecting lighttp requests on this port.
When changing port, that fine !!

My guess , is something is blocking port 80 , because locally , no problems.

Volumio runs on port 3000, re-directing port 3000 to 80 is configured in /etc/iptables.rules
Not really sure what you are trying to do, but that file should be key and no guarantee (unsupported, own risk)

Just came across this post, in case people are interested.

Everything can be done with iptables. I use my Volumio Pi as a Hotspot for friends who’re still using 2.4ghz wireless. So I need to have internet, access to volumio and pi-hole is running on it too.

*nat
:PREROUTING ACCEPT [186:26852]
:INPUT ACCEPT [36:3895]
:OUTPUT ACCEPT [72:27170]
:POSTROUTING ACCEPT [16:1324]
-A PREROUTING -d 192.168.0.32/32 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3000  #More specific rule to redirect to volumio from LAN
-A PREROUTING -d 192.168.211.1/32 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3000 #More specific rule to redirect to volumio from WLAN
-A PREROUTING -d 192.168.0.32/32 -p tcp -m tcp --dport 3080 -j REDIRECT --to-ports 80 #Rule to redirect port 3080 to port 80 to acces pi-hole admin
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Fri Aug 19 11:01:28 2016
# Generated by iptables-save v1.4.21 on Fri Aug 19 11:01:28 2016
*filter
:INPUT ACCEPT [144:81076]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [143:11589]
-A INPUT -p tcp -m tcp --dport 53 -j ACCEPT #pi-hole DNS
-A INPUT -p udp -m udp --dport 53 -j ACCEPT #pi-hole DNS
-A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT # Internet way back for hotspot clients
-A FORWARD -i wlan0 -o eth0 -j ACCEPT # Internet forward for hotspot clients
COMMIT
  • iptables-save > /etc/iptables.rules #to persist the rules
  • iptables -A INPUT… #to add manually INPUT rule
  • iptables -A FORWARD … #to add manually FORWARD rule
  • iptables -t nat -A PREROUTING #to add manually PREROUTING rule
  • iptables -t nat -A POSTROUTING #to add manually POSTROUTING rule
  • Replace -A by -D to remove a rule.
  • iptables-save to list current rules

@Flo

how i can change or add the rules?
because the file /etc/iptables.rules is generated every reboot new :frowning:

the complete iptables folder and command cannot find on the last Image (RC2 Fix) I have only the generated file /etc/iptables.rules

$ iptables-save > /etc/iptables.rules -bash: /etc/iptables.rules: Permission denied

$ ls -al /etc/iptables.rules -rw-r--r-- 1 root root 305 Aug 31 10:16 /etc/iptables.rules

Volumio is standard listen on port 80 and 3000, i want that volumio only listen on Port 3000.

You need to use sudo to run the commands, otherwise you’ll get denied errors.

Volumio port is 3000 only, iptable redirects port 80 to 3000 which allow you to use it on both ports.

All the commands you need :
Just don’t forget to use sudo.

  • iptables-save > /etc/iptables.rules #to persist the rules
  • iptables -A INPUT… #to add manually INPUT rule
  • iptables -A FORWARD … #to add manually FORWARD rule
  • iptables -t nat -A PREROUTING #to add manually PREROUTING rule
  • iptables -t nat -A POSTROUTING #to add manually POSTROUTING rule
  • Replace -A by -D to remove a rule.
  • iptables-save to list current rules

I have my mistake found :blush:

the command “sudo iptables-save > /etc/iptables.rules” say “-bash: /etc/iptables.rules: Permission denied”

if i log in as root, the command work. Thank you.

I am trying to do the same, and getting stumped. I am just trying to get volumio and pihole working together. I can access the volumio page when I use :3000 after the static ip for volumio. However, I cant get to the pihole page. Typing in just the ip address shows me a cant reach page message.

In your iptables, are you using :3080/admin as your pihole admin page? Because looks like you still route port 80 to 3000 for volumio and 3080 to 80 for pi hole?

Yes I do, that way I can keep using Volumio on port 80

did you have issues with services? I am able to get to the admin page on the pihole setup and looks like most of my services are running except for dnsmasq - which is stopped. Not sure why - do you remember running into anything like that?

No I didn’t get any issues, to be honest I just set it up and that’s it. I never use the admin panel. I see that adverts are blocked and that’s all I need :slight_smile:

Thanks to this post I removed the redirection on port 80 using :

I now have

*nat
:PREROUTING ACCEPT [228:63917]
:INPUT ACCEPT [245:64801]
:OUTPUT ACCEPT [136:28106]
:POSTROUTING ACCEPT [136:28106]
COMMIT

I don’t know if I didn’t refresh properly my browser or if I broke something else but few hours later I realized it’s not working when I access 192.168.x.x:3000 : 16-11-03 at 18.05.JPG

PS : If I revert the change on the iptable (-A instead of -D) volumio is working fine on port 80.
PS2 : I noticed some services are down, I don’t know if it’s OK or game-breaker…
16-11-03 at 18.00.JPG

What are you tying to achieve?

I need to keep port 80 free for my web server so I tried to remove the redirection made by volumio.

I guess for node to be happy you still need to NAT it.

try iptables -t nat -A PREROUTING -p tcp -m tcp --dport 3000 -j REDIRECT --to-ports 3000

Thanks for your help, unfortunately it’s not working.
16-11-03 at 21.50.JPG

Can you post the output of iptables-save?

[code]# Generated by iptables-save v1.4.21 on Thu Nov 3 21:50:47 2016
*nat
:PREROUTING ACCEPT [333:71865]
:INPUT ACCEPT [349:72697]
:OUTPUT ACCEPT [106:25877]
:POSTROUTING ACCEPT [106:25877]
-A PREROUTING -p tcp -m tcp --dport 3000 -j REDIRECT --to-ports 3000
COMMIT

Completed on Thu Nov 3 21:50:47 2016

[/code]