LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-10-2016, 06:53 AM   #1
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
iptables blocks connections made to my server


dmesg is reporting this:
Code:
[2943847.366031] Firewall: *TCP_OUT Blocked* IN= OUT=eth0 SRC=MY SERVER'S IP DST=208.83.137.118 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=25064 DF PROTO=TCP SPT=42262 DPT=2703 WINDOW=29200 RES=0x00 SYN URGP=0 UID=989 GID=985
It shows up dozens of times. Should I be worried? Could I have a bot on the server?

I have csf/lfd installed on my server - I also have owncloud, apache, mysql, phpmyadmin, an unsecured vsftpd server, mail (postfix, dovecot, amavis, spamassassin, openvpn, ssh - 3 bad logins block the ip permanently, named server).

This type of connection to port 2703 seems to be the only connection being blocked by iptables coming from my own server.
 
Old 12-10-2016, 10:53 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
You certainly could have a bot on your server, but it's also possible that this is just innocuous traffic, Investigation is warranted. Have you looked at what process ID 25064 actually is (if it's a long running process)? Likewise who UID 989 is (is this a human user of the system, or a system account)? According to /etc/services on my machine, port 2703 is used by the sms-chat service. I'm not familiar with this, but is it something you would expect to have connections being made to? If not, you're going to have to dig down and figure out what the process(es) that are making this connection are actually doing and if it's potentially malicious. If it's lots of different processes, you'll need to see what's launching them (possibly use process accounting, if you have it enabled).

Also, you need to review tyour iptables configuration. Did you make it yourself or use something "pre-rolled" by your distro? It's possible that you're not seeing any other traffic being blocked because iptables is not configured to block it or not configured to report said block in the logs.

One other note here - you seem to have a bunch of services running on one system. If this is in any way possible, you should try to split them up between multiple systems (use VMs if possible). That way, problems with one service cannot affect other services, and it makes it much easier to track down potential incidents like this (since fewer things are running).
 
Old 12-10-2016, 11:45 AM   #3
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Original Poster
Rep: Reputation: 103Reputation: 103
It didn't even cross my mind to check the UID and GID. Hadn't seen it in dmesg. Thank you for pointing it out. UID 989 and GID 985 are amavis' So I suppose it is related to "Vipul's Razor distributed, collaborative, spam-detection-and-filtering network uses port 2703 (TCP)." (according to speedguide.net)

I configured the firewall myself, using csf, but csf comes with some predefined rules too, such as syn flood protection, etc. which I'm quite certain they're fine. But I opened some ports, used portflood for ssh and so on.

I know running too many services isn't recommended. Unfortunately I cannot afford other vps for now. I'll probably try to buy myself a server later on which is capable of virtualization and so on.

If you could point me to some resources where I can search deeper for malware, that would be helpful. Or you could also suggest I should be searching for further in this particular case, even if I identified the 'culprit'. How could I have made a connection between dubious processes and the dubious network traffic?

Do you think I should just open port 2703? I'm thinking amavis is trying to download new information (spam lists, whatever).
 
Old 12-10-2016, 10:59 PM   #4
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by vincix View Post
Do you think I should just open port 2703? I'm thinking amavis is trying to download new information (spam lists, whatever).
Read the documentation for this product. It should spell out what ports it requires open and what they are used for.

I would ask you to post your rules so someone can take a look at them if you are not sure they are setup correctly.
 
Old 12-13-2016, 02:07 PM   #5
tramsch
Member
 
Registered: May 2014
Distribution: Gentoo, RHEL, Mint
Posts: 35

Rep: Reputation: 6
Hi vincix,

the destination IP belongs to d302.cloudmark.com

cloudmark.com seems to be in the security/mail-protection business, got anything to do with them?

br
Florian
 
Old 12-13-2016, 02:09 PM   #6
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Original Poster
Rep: Reputation: 103Reputation: 103
No. Never heard of them. Amavis might get some information from there (spam lists, whatever).
 
Old 12-13-2016, 02:25 PM   #7
tramsch
Member
 
Registered: May 2014
Distribution: Gentoo, RHEL, Mint
Posts: 35

Rep: Reputation: 6
If you could trigger the amavis update manually, you could check the logs and know for sure.
 
  


Reply



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
iptables blocks dns server poard Linux - Security 4 07-14-2014 03:33 AM
Incomprehensible Iptables; Firewall Blocks Everything! Completely Clueless Linux - Security 18 01-23-2009 07:56 AM
DNSBL blocks and iptables fukawi2 Linux - Networking 2 10-26-2008 06:57 PM
iptables causes delay and blocks irrationally niehls Linux - Networking 4 08-21-2004 01:16 PM
Hwo do I log as much information as possible about connections made to Linux Box? jdruin Linux - Security 6 11-10-2003 01:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:04 PM.

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
Open Source Consulting | Domain Registration