Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

SUN RPC viewable toe veryone.. and IPTables cant stop it?

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
HydroSan
l33t
l33t
User avatar
Posts: 764
Joined: Thu Mar 04, 2004 5:43 pm
Location: The Kremlin (aka Canada)
Contact:
Contact HydroSan
Website

SUN RPC viewable toe veryone.. and IPTables cant stop it?

  • Quote

Post by HydroSan » Sun Sep 25, 2005 8:17 pm

I did two separate portscans from websites to see if I were vulnerable. Currently, they say Port 111 on both TCP and UDP is open, which is the SUN RPC protocol.

So I thought, alright, just add a simple IPTables rule:

Code: Select all

iptables -A INPUT -i $INTERNET -p tcp --dport 111 -j DROP
iptables -A INPUT -i $INTERNET -p udp --dport 111 -j DROP
... But Port 111 is still open.

Also, on a scary note, Port 138 and 137 are open as well, and the above rules don't work for them.

Is there anything I'm doing wrong?
I was a Gangster for Capitalism, by Major General Smedley Butler.

Server status: Currently down, being replaced with fresh install - 20% completed.
Top
HydroSan
l33t
l33t
User avatar
Posts: 764
Joined: Thu Mar 04, 2004 5:43 pm
Location: The Kremlin (aka Canada)
Contact:
Contact HydroSan
Website

  • Quote

Post by HydroSan » Mon Sep 26, 2005 1:36 am

bump.
I was a Gangster for Capitalism, by Major General Smedley Butler.

Server status: Currently down, being replaced with fresh install - 20% completed.
Top
roarinelk
Guru
Guru
User avatar
Posts: 524
Joined: Thu Mar 04, 2004 12:24 pm

  • Quote

Post by roarinelk » Mon Sep 26, 2005 7:01 am

a bit strange that it doesn't work for you.

Try this, I use this on my router box:

Code: Select all

iptables -I INPUT -i eth0 -m multiport -p tcp --dports 137,139,445,631,53 -j DROP
iptables -I INPUT -i eth0 -m multiport -p udp --dports 137,138,139,445,631 -j DROP
needs the ipt_multiport netfilter module.

as far as i can tell, those ports are shut. you could create a separate chain with a logging
directive inside, to see if it works, and then let the filter line above jump to it, something like this:

Code: Select all

iptables -t filter -N DEBUGLOG >/dev/null 2>&1
iptables -t filter -A DEBUGLOG -j LOG --log-prefix "++FILTERED: "
iptables -t filter -A DEBUGLOG -j DROP

iptables -I INPUT -i eth0 -m multiport -p tcp --dports 137,139,445,631,53 -j DEBUGLOG
iptables -I INPUT -i eth0 -m multiport -p udp --dports 137,138,139,445,631 -j DEBUGLOG
and then scan your host again. you should see a few "++FILTERED: ..." messages in dmesg.

good luck,

--
mlau
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

  • Quote

Post by PaulBredbury » Mon Sep 26, 2005 7:28 am

What is the value of "$INTERNET"? Perhaps you have a preceding "ACCEPT" iptables rule which takes precedence. To list the active rules:

Code: Select all

iptables -L -n
Top
Post Reply

4 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic