โดยปกติแล้ว Squid Proxy จะ Default เป็น Port 3128 

แต่ถ้าคุณต้องการเปลี่ยนเป็น Port อื่น เพื่อเลี่ยงการโจมตีจากภายนอกหรือด้วยเหตุผลอื่นก็ตาม

ใน Fedora จะมีระบบ SELinux ที่คอยปกป้องระบบของคุณอยู่ มันจะไม่ยอมให้คุณเปลี่ยน Port ได้ง่าย ๆ แน่ สิ่งที่มันจะบอกคุณ ก็คือ  

 SELinux is preventing the squid (squid_t) from binding to port 3127

 คำอธิบาย

SELinux has denied the squid from binding to a network port 3127 which does not have an SELinux type associated with it. If squid is supposed to be allowed to listen on this port, you can use the semanage command to add this port to a port type that squid_t can bind to. semanage port -l will list all port types. Please file a bug report against the selinux-policy package. If squid is not supposed to bind to this port, this could signal a intrusion attempt. If this system is running as an NIS Client, turning on the allow_ypbind boolean, may fix the problem. setsebool -P allow_ypbind=1.

If you want to allow squid to bind to this port semanage port -a -t PORT_TYPE -p PROTOCOL 3127 Where PORT_TYPE is a type that squid_t can bind and PROTOCOL is udp or tcp.

สิ่งที่คุณต้องทำก็คือ   

[root@fedprox /]#semanage port -a -t http_cache_port_t -p tcp 3127

แค่นี้ก็จบแล้วครับ หลังจากนี้คุณก็สามารถเปลี่ยนมาใช้ Port 3127 ใน Fedora 9 ได้แล้ว

 

 

 

Comment



smilebig smileopen-mounthed smileconfused smilesad smileangry smiletonguequestionembarrassedsurprised smilewinkdouble winkcry