*nix Thread, IPTables - Port rules in Technical; Hi Guys,
Anyone know how to block external (internal) access to a port on a *nix machine. Currently running a ...
17th September 2008, 03:41 PM #1
IPTables - Port rules
Anyone know how to block external (internal) access to a port on a *nix machine. Currently running a SQUID(NTLM)>DANSGUARDIAN>SQUID(CACHE) setup and its working beautifully, only problem. Changing ports allows skipping of both S1, and DG.
NTLM running on 8080, DG running on 1355, CACHE running on 1356. I can change the port to 1356 and head straight onto the interweb, how do I only allow 127.0.0.1 to access port 1356?
I found this code somewhere on the interweb, however it wasn't related to the topic.
Not quite sure, not sure on the /24 either.
iptables -t nat -D PREROUTING -s ! 127.0.0.1/24 -p tcp --dport 1356 -j DROP
IDG Tech News
17th September 2008, 03:45 PM #2
Easier way, make squid listen only on localhost.
Thanks to Geoff from:
ahuxham (17th September 2008)
17th September 2008, 03:56 PM #3
Thanks Geoff, I did think of that but had tried 127.0.0.1:1356 and it still allowed a connection through, however localhost works perfectly!
Originally Posted by Geoff
P.S Would the above code do the same?
By Tiger in forum MIS Systems
Last Post: 19th February 2008, 11:13 PM
Last Post: 23rd December 2007, 11:19 PM
By bigb3n in forum Windows
Last Post: 29th October 2007, 02:20 PM
Last Post: 9th November 2005, 02:54 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)