Re: Tux listen on different IP or Port

Alex Davies <[email protected]> Wed, 8 Feb 2006 16:25:07 +0000
Newsgroups gmane.network.tux
Message-ID <[email protected]>
--===============0266287983==
Content-Type: multipart/alternative; 
	boundary="----=_Part_4565_26051710.1139415907870"

------=_Part_4565_26051710.1139415907870
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Dear Max,

Many thanks for your help.

I don't get the same effect - now it just does not bind to *any* IP and doe=
s
not produce any logs:

[root@trust1 log]# service tux stop
Stopping tux:
[root@trust1 log]# ps aux | grep tux
root      6617  0.0  0.0  5396  656 pts/0    S+   16:21   0:00 grep tux
[root@trust1 log]# echo "http://83.223.121.93:80" > /proc/net/tux/0/listen/=
0
[root@trust1 log]# service tux start
Starting tux:                                              [  OK  ]
[root@trust1 log]# lynx http://83.223.121.93:80


Exiting via interrupt: 2 (did not work)

[root@trust1 log]# tail /proc/net/tux/0/listen/0
http://83.223.121.93:80

My netstat shows a very different output too:

[root@trust1 log]# netstat -lt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address
State
tcp        0      0 *:835                       *:*
LISTEN
tcp        0      0 *:sunrpc                    *:*
LISTEN
tcp        0      0 *:10000                     *:*
LISTEN
tcp        0      0 *:ftp                       *:*
LISTEN
tcp        0      0 *:ipp                       *:*
LISTEN
tcp        0      0 localhost.localdomain:smtp  *:*
LISTEN
tcp        0      0 *:ssh                       *:*
LISTEN
[root@trust1 log]#

Many thanks for your continued help on this!

Alex

On 08/02/06, Max Helmet <[email protected]> wrote:
> Hi Alex,
>
> You probably altered /proc/net/tux/0/listen/0 while TUX was running. I
think
> TUX needs to be stopped when you alter the file.
>
> I just tried the following, and it worked on my end:
>
> $ /etc/init.d/tux stop
> $ echo "http://192.168.0.198:8080" > /proc/net/tux/0/listen/0
> $ /etc/init.d/tux start
> $ netstat -lt
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address           Foreign Address         State
> tcp        0      0 192.168.0.198:webcache  *:*                     LISTE=
N
>
> Regards,
> Maximilian
>
> > Dear Max,
> >
> > I want to run Tux on one IP to serve up soley static content (images
> > and so on). I am under the impression that this will give me greater
> > performance than thttpd.
> >
> > I want to run Apache on another IP to server up PHP websites.
> >
> > echo "http://x.x.x.x:80" > /proc/net/tux/0/listen/0
> >
> > Indeed changes that file, but when I restart tux it is still listening
> > on all IP addresses bound to that server!
> >
> > If I change the port it just ignores it and remains bound to port 80.
> >
> > With many thanks,
> >
> > Alex
>
> _______________________________________________
> tux-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/tux-list
>


--
Alex Davies // http://www.davz.net

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender immediately by e-mail and delete this e-mail permanently.

Contact me - MSN: [email protected] SKYPE: alex.davies

------=_Part_4565_26051710.1139415907870
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Dear Max,<br><br>Many thanks for your help.<br><br>I don't get the same eff=
ect - now it just does not bind to *any* IP and does not produce any logs:<=
br><br><span style=3D"font-family: courier new,monospace;">[root@trust1 log=
]# service tux stop
</span><br style=3D"font-family: courier new,monospace;"><span style=3D"fon=
t-family: courier new,monospace;">Stopping tux:</span><br style=3D"font-fam=
ily: courier new,monospace;"><span style=3D"font-family: courier new,monosp=
ace;">
[root@trust1 log]# ps aux | grep tux</span><br style=3D"font-family: courie=
r new,monospace;"><span style=3D"font-family: courier new,monospace;">root&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6617&nbsp;&nbsp;0.0&nbsp;&nbsp;0.0&nbsp;=
&nbsp;5396&nbsp;&nbsp;656 pts/0&nbsp;&nbsp;&nbsp;&nbsp;S+&nbsp;&nbsp; 16:21=
&nbsp;&nbsp; 0:00 grep tux</span><br style=3D"font-family: courier new,mono=
space;">
<span style=3D"font-family: courier new,monospace;">[root@trust1 log]# echo=
 &quot;<a href=3D"http://83.223.121.93:80">http://83.223.121.93:80</a>&quot=
; &gt; /proc/net/tux/0/listen/0</span><br style=3D"font-family: courier new=
,monospace;">
<span style=3D"font-family: courier new,monospace;">[root@</span><span styl=
e=3D"font-family: courier new,monospace;">trust1 log]# service tux start</s=
pan><br style=3D"font-family: courier new,monospace;"><span style=3D"font-f=
amily: courier new,monospace;">
Starting tux:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&nbsp;&nbs=
p;OK&nbsp;&nbsp;]</span><br style=3D"font-family: courier new,monospace;"><=
span style=3D"font-family: courier new,monospace;">[root@trust1 log]# lynx =
<a href=3D"http://83.223.121.93:80">
http://83.223.121.93:80</a></span><br style=3D"font-family: courier new,mon=
ospace;"><br style=3D"font-family: courier new,monospace;"><br style=3D"fon=
t-family: courier new,monospace;"><span style=3D"font-family: courier new,m=
onospace;">
Exiting via interrupt: 2 <span style=3D"font-style: italic;">(did not work)=
</span></span><br style=3D"font-family: courier new,monospace;"><br style=
=3D"font-family: courier new,monospace;"><span style=3D"font-family: courie=
r new,monospace;">
[root@trust1 log]# tail /proc/net/tux/0/listen/0</span><br style=3D"font-fa=
mily: courier new,monospace;"><span style=3D"font-family: courier new,monos=
pace;">http:/</span><span style=3D"font-family: courier new,monospace;">/83=
.223.121.93:80
</span><br><br>My netstat shows a very different output too:<br><br><span s=
tyle=3D"font-family: courier new,monospace;">[root@trust1 log]# netstat -lt=
</span><br style=3D"font-family: courier new,monospace;"><span style=3D"fon=
t-family: courier new,monospace;">
Active Internet connections (only servers)</span><br style=3D"font-family: =
courier new,monospace;"><span style=3D"font-family: courier new,monospace;"=
>Proto Recv-Q Send-Q Local Address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Foreign Address&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; State
</span><br style=3D"font-family: courier new,monospace;"><span style=3D"fon=
t-family: courier new,monospace;">tcp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 *:835&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; *:*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; LISTEN</span><br style=3D"font-family: courier new=
,monospace;">
<span style=3D"font-family: courier new,monospace;">tcp&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 *:sunrpc&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *:*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp; LISTEN</span><br style=3D"font-family: courier =
new,monospace;"><span style=3D"font-family: courier new,monospace;">
tcp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; 0 *:10000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *:*&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LISTEN</span><br st=
yle=3D"font-family: courier new,monospace;"><span style=3D"font-family: cou=
rier new,monospace;">tcp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp; 0 *:ftp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; *:*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; LISTEN
</span><br style=3D"font-family: courier new,monospace;"><span style=3D"fon=
t-family: courier new,monospace;">tcp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 *:ipp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; *:*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; LISTEN</span><br style=3D"font-family: courier new=
,monospace;">
<span style=3D"font-family: courier new,monospace;">tcp&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 localhost.localdom=
ain:smtp&nbsp; *:*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; LISTEN</span><br style=3D"font-family: courier new,monospace;"=
><span style=3D"font-family: courier new,monospace;">
tcp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; 0 *:ssh&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *:*&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LISTEN</s=
pan><br style=3D"font-family: courier new,monospace;"><span style=3D"font-f=
amily: courier new,monospace;">[root@trust1 log]#</span><br style=3D"font-f=
amily: courier new,monospace;">
<br>Many thanks for your continued help on this!<br><br>Alex<br><br>On 08/0=
2/06, Max Helmet &lt;<a href=3D"mailto:[email protected]">max@e=
xpires-2004.workforce.de</a>&gt; wrote:<br>&gt; Hi Alex,<br>&gt; <br>&gt; Y=
ou probably altered /proc/net/tux/0/listen/0 while TUX was running. I think
<br>&gt; TUX needs to be stopped when you alter the file.<br>&gt; <br>&gt; =
I just tried the following, and it worked on my end:<br>&gt; <br>&gt; $ /et=
c/init.d/tux stop<br>&gt; $ echo &quot;<a href=3D"http://192.168.0.198:8080=
">
http://192.168.0.198:8080</a>&quot; &gt; /proc/net/tux/0/listen/0<br>&gt; $=
 /etc/init.d/tux start<br>&gt; $ netstat -lt<br>&gt; Active Internet connec=
tions (only servers)<br>&gt; Proto Recv-Q Send-Q Local Address&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Foreign Address&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; State
<br>&gt; tcp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;0 192.168.0.198:webcache&nbsp;&nbsp;*:*&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LISTEN<br>&gt; <br>&gt; Regards,<br>&gt; Ma=
ximilian<br>&gt; <br>&gt; &gt; Dear Max,<br>&gt; &gt;<br>&gt; &gt; I want t=
o run Tux on one IP to serve up soley static content (images
<br>&gt; &gt; and so on). I am under the impression that this will give me =
greater<br>&gt; &gt; performance than thttpd.<br>&gt; &gt;<br>&gt; &gt; I w=
ant to run Apache on another IP to server up PHP websites.<br>&gt; &gt;
<br>&gt; &gt; echo &quot;<a href=3D"http://x.x.x.x:80">http://x.x.x.x:80</a=
>&quot; &gt; /proc/net/tux/0/listen/0<br>&gt; &gt;<br>&gt; &gt; Indeed chan=
ges that file, but when I restart tux it is still listening<br>&gt; &gt; on=
 all IP addresses bound to that server!
<br>&gt; &gt;<br>&gt; &gt; If I change the port it just ignores it and rema=
ins bound to port 80.<br>&gt; &gt;<br>&gt; &gt; With many thanks,<br>&gt; &=
gt;<br>&gt; &gt; Alex<br>&gt; <br>&gt; ____________________________________=
___________
<br>&gt; tux-list mailing list<br>&gt; <a href=3D"mailto:[email protected]=
m">[email protected]</a><br>&gt; <a href=3D"https://www.redhat.com/mailma=
n/listinfo/tux-list">https://www.redhat.com/mailman/listinfo/tux-list</a><b=
r>
&gt; <br><br><br>-- <br>Alex Davies // <a href=3D"http://www.davz.net">http=
://www.davz.net</a><br><br>This email and any files transmitted with it are=
 confidential and<br>intended solely for the use of the individual or entit=
y to whom they
<br>are addressed. If you have received this email in error please notify<b=
r>the sender immediately by e-mail and delete this e-mail permanently.<br><=
br>Contact me - MSN: <a href=3D"mailto:[email protected]">[email protected]=
om
</a> SKYPE: alex.davies<br>

------=_Part_4565_26051710.1139415907870--


--===============0266287983==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
tux-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/tux-list
--===============0266287983==--