LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 06-11-2006, 12:43 PM   #1
geletine
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 213
Blog Entries: 2

Rep: Reputation: 30
localhost port 80 not available


i have included them in my iptables script as

Code:
#!/bin/sh

IPT="/usr/sbin/iptables"

echo "0" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/tcp_syncookies
echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "1" > /proc/sys/net/ipv4/conf/all/rp_filter
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
echo "0" > /proc/sys/net/ipv4/conf/all/accept_source_route
echo "1" > /proc/sys/net/ipv4/conf/all/secure_redirects
echo "1" > /proc/sys/net/ipv4/conf/all/log_martians

$IPT -F
$IPT -F -t nat
$IPT -F -t mangle

$IPT -X
$IPT -X -t nat
$IPT -X -t mangle

$IPT -P INPUT DROP
$IPT -P OUTPUT ACCEPT

$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPT -A INPUT -i lo -m state --state NEW -j ACCEPT
$IPT -A INPUT -j LOG --log-prefix "INPUT DROP: "
$IPT -A INPUT -p tcp --dport 80 -j ACCEPT
$IPT -A INPUT -p udp --dport 80 -j ACCEPT

/sbin/modprobe ip_conntrack_ftp
/sbin/modprobe ip_conntrack_irc

echo "So let it be written. So let it be done.
the scripts works, but does not open port 80.
 
Old 06-11-2006, 03:00 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
what makes you think that it's not open? you've not even mentioned anything about anythign listening on that port.
 
Old 06-11-2006, 04:36 PM   #3
geletine
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 213
Blog Entries: 2

Original Poster
Rep: Reputation: 30
I am wanting to use exit 66 jukebox to stream audio on my network , when i run the app, it says port 80 is not being used, try another, it works fine on port 4773, but the other boxes on the network cannot access it, thereby i am inclined to get it working on port 80 after all i have no running port 80 being used according to nmap.


Code:
 nmap -sT -O localhost

Starting Nmap 4.03 ( http://www.insecure.org/nmap/ ) at 2006-06-11 21:32 BST
Interesting ports on allix.allix (127.0.0.1):
(The 1670 ports scanned but not shown below are in state: closed)
PORT     STATE SERVICE
37/tcp   open  time
113/tcp  open  auth
631/tcp  open  ipp
6000/tcp open  X11
No exact OS matches for host (If you know what OS is running on it, see http://w    ww.insecure.org/cgi-bin/nmap-submit.cgi).
TCP/IP fingerprint:
SInfo(V=4.03%P=x86_64-slackware-linux-gnu%D=6/11%Tm=448C7DF9%O=37%C=1)
TSeq(Class=RI%gcd=1%SI=1F13DD%IPID=Z%TS=U)
TSeq(Class=RI%gcd=1%SI=1F13DC%IPID=Z%TS=U)
T1(Resp=Y%DF=Y%W=7FFF%ACK=S++%Flags=AS%Ops=MNW)
T2(Resp=N)
T3(Resp=N)
T4(Resp=Y%DF=Y%W=0%ACK=O%Flags=R%Ops=)
T5(Resp=Y%DF=Y%W=0%ACK=S++%Flags=AR%Ops=)
T6(Resp=Y%DF=Y%W=0%ACK=O%Flags=R%Ops=)
T7(Resp=N)
PU(Resp=Y%DF=N%TOS=C0%IPLEN=164%RIPTL=148%RID=E%RIPCK=E%UCK=E%ULEN=134%DAT=E)
Nmap finished: 1 IP address (1 host up) scanned in 9.638 seconds
 
Old 06-11-2006, 07:58 PM   #4
Habu
Member
 
Registered: Apr 2005
Location: Malaysia
Distribution: Fedora, Suse
Posts: 108

Rep: Reputation: 15
Look at the nmap output, it says ports other than the ones listed are closed. This is correct, because i assume you have nothing listening on that port. If the firewall were blocking the port, nmap would say it's "filtered". But then again, running nmap against localhost wouldn't return accurate results, because the firewall often isn't configured to block connections from localhost. That's probably why all the ports are shown as closed and not filtered.
Now for that streaming app, are you running it as root? Have you tried doing so? Because i think only root is allowed to listen on ports below 1024. A quick (but lousy) fix would be to use iptables to redirect all connections to the machine on port 80 to port 4773. Then you'd be able to run the app as a non-privileged user.
You say it works fine on port 4773, but other machines can't access it, why is this so? I'd guess because you didn't open port 4773 in the firewall? Perhaps that would be a better solution, open that port and configure your clients to use that port.
 
Old 06-12-2006, 07:03 AM   #5
geletine
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 213
Blog Entries: 2

Original Poster
Rep: Reputation: 30
thanks for that, i don;t run the streaming app as root, regarding your last point

if i added to iptables the following.

$IPT -A INPUT -p tcp --dport 4773 -j ACCEPT
$IPT -A INPUT -p udp --dport 4773 -j ACCEPT

would that open the ports for the other clients on the same network? or do i need to add something else ?


thanks
 
Old 06-12-2006, 07:14 AM   #6
Habu
Member
 
Registered: Apr 2005
Location: Malaysia
Distribution: Fedora, Suse
Posts: 108

Rep: Reputation: 15
That should be all, you shouldn't need to configure the clients, they'd be able to open connections to any port (unless there are restrictions in place). So in your clients you'd just have to type in http://server_add:4773 in the web browser to access the app.
 
Old 06-12-2006, 07:37 AM   #7
geletine
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 213
Blog Entries: 2

Original Poster
Rep: Reputation: 30
thanks that works

unfortunately i did not read the app specifications properly, the music is still played on the server, the clients pick a song from a list and the server plays it, very much like a jukebox.
Its a java app so i could not run it from root if i wanted port 80...

there seems to be a request for streaming audio
http://developer.berlios.de/feature/?group_id=4414

I look for another app ...
 
Old 06-12-2006, 08:52 AM   #8
Habu
Member
 
Registered: Apr 2005
Location: Malaysia
Distribution: Fedora, Suse
Posts: 108

Rep: Reputation: 15
You could look into shoutcast, i believe it does what you're looking for.
 
Old 06-12-2006, 09:20 AM   #9
geletine
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 213
Blog Entries: 2

Original Poster
Rep: Reputation: 30
icecast http://www.icecast.org/
and
muse http://muse.dyne.org/

does the work nicely
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not connect to host localhost (port 631) fireedo Slackware 6 01-05-2007 12:55 PM
port 25 connection refused even from localhost?? Ed1952 Red Hat 2 11-15-2005 09:24 AM
route locally generated traffic to ip:port to localhost:port maenho Linux - Software 2 03-11-2005 05:08 AM
Unable to access port 80 from anywhere but localhost hecter Linux - Security 1 10-07-2004 09:12 AM
localhost:port sodhilogin Linux - General 7 05-14-2003 08:20 AM


All times are GMT -5. The time now is 01:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration