LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-03-2009, 12:22 PM   #1
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Rep: Reputation: 30
server firewall rules


I am going to have squid proxy on my server and am wondering what firewall rules to set up.
The host has a firewall tracking at the entry to their network. However, I can have an extra one on my server.
Is it worth it?
Would I only open up port 80 for the proxy?

At the moment I have this:

Local Port

Protocol

Action

Status
1 All Any 22 TCP Allow Active
2 All Any 80 TCP Allow Active
3 All Any 443 TCP Allow Active
4 All Any 8443 TCP Allow Active
5 All 53 Any UDP Allow Active
6 All 123 Any UDP Allow Active
7 All ICMP Allow Active

Last edited by qwertyjjj; 08-03-2009 at 12:24 PM.
 
Old 08-03-2009, 12:47 PM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Rep: Reputation: 148Reputation: 148
Allow your proxy listening port(in default 3128)
 
Old 08-03-2009, 12:59 PM   #3
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by kirukan View Post
Allow your proxy listening port(in default 3128)
I have added 2 IPs. One for the proxy server, one for the SSH.
I can't ping the ssh IP. It has no reverse look up, could that be the issue?
I thought for security it was supposed to have no reverse lookup but then how can the ping command find it?
 
Old 08-03-2009, 01:01 PM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
How is the network set up ?
 
Old 08-03-2009, 01:02 PM   #5
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by repo View Post
How is the network set up ?
Set up by a host company.
 
Old 08-03-2009, 01:04 PM   #6
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Quote:
I have added 2 IPs. One for the proxy server, one for the SSH.
What ip's did you assigned?
Are they public ip's?
 
Old 08-03-2009, 01:05 PM   #7
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by repo View Post
What ip's did you assigned?
Are they public ip's?
I believe so. I can ping one of them, the one that has reverse lookup.
Can't ping the other.
 
Old 08-03-2009, 01:07 PM   #8
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Where did you get the ip's from?
do you use 192.168.xxx.xxx or 10.0.0.xxx or a public ip?
Did you assigned 2 ip's to the networkcard?
Why?
 
Old 08-03-2009, 01:22 PM   #9
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by repo View Post
Where did you get the ip's from?
do you use 192.168.xxx.xxx or 10.0.0.xxx or a public ip?
Did you assigned 2 ip's to the networkcard?
Why?
got them from the hosting company.
The addresses are 213.xxx.xxx.xxx - this I can ping
the other is 87.xxx.xxx.xxx
both public

Last edited by qwertyjjj; 08-03-2009 at 01:25 PM.
 
Old 08-03-2009, 01:30 PM   #10
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
So the server has 1 networkcard with ip 212.xxx.xxx.xxx
You assigned the ip 87.xxx.xxx.xxx to what? are there 2 networkcards?
You connect to the server using ssh to ip 212.xxx.xxx.xxx from your home.

server => 212.xxx.xxx.xxx => internet => your home computer
Where did you setup 87.xxx.xxx.xxx ?
 
Old 08-03-2009, 02:23 PM   #11
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by repo View Post
So the server has 1 networkcard with ip 212.xxx.xxx.xxx
You assigned the ip 87.xxx.xxx.xxx to what? are there 2 networkcards?
You connect to the server using ssh to ip 212.xxx.xxx.xxx from your home.

server => 212.xxx.xxx.xxx => internet => your home computer
Where did you setup 87.xxx.xxx.xxx ?
I'm not sure how they set it up but I believe it's just an IP routing at their firewall maybe.
87.xxx.xxx.xxx is setup through their control panel and I can set up different firewall access rules.

I can ping and connect to 212 from home using SSH.
I cannot ping or connect to 87. but it does not have reverse lookup.
 
Old 08-03-2009, 03:47 PM   #12
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Quote:
I cannot ping or connect to 87. but it does not have reverse lookup.
Seems to me 87.xxx.xxx.xxx is not routed correctly.
It has nothing to do with reverse lookup
Perhaps you can contact the hosting provider.
 
Old 08-03-2009, 08:45 PM   #13
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by repo View Post
Seems to me 87.xxx.xxx.xxx is not routed correctly.
It has nothing to do with reverse lookup
Perhaps you can contact the hosting provider.
Ok. I've sorted that now, was a config issue and also firewall issue.
Now...
a guide I read says
Quote:
Access

Never ever use standard ports or your main IP for shell access, and never use FTP.

Result? Every server requires at least two IP addresses - one for the httpd server that resolves from your web domain, and one for SSH (running on non-standard port). So we have:-

www.example.com A RECORD 123.123.123.123 (httpd binds to this)

.... and one further IP address, with no reverse lookup set in DNS for SSHd and for SSHd only. And not on port 22 - go for a random port > 1024.

What about FTP? What about it indeed. You don't need it if you have SSH - any half decent FTP client can tunnel in over SSH. It's called secure FTP or SFTP. FileZilla will do it.
My server also has the plesk control panel available on 443 and 8443.
SHould these ports be moved to only be accessible on the 2nd IP address?
So, in effect the shared IP only has the proxy server ports open?
To change the SSH port, does the SSH listening pot have to be changed in linux?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
firewall rules sulekha Linux - Networking 2 10-09-2008 03:30 AM
Linux firewall rules prashanlk Linux - Networking 3 11-28-2007 01:06 PM
Resetting ALL Firewall rules RemusX2 Linux - Software 1 02-28-2005 08:18 AM
Firewall Rules studpenguin Linux - Security 0 07-01-2004 04:14 AM
help with firewall rules please deuce868 Linux - Security 1 06-14-2004 04:18 PM


All times are GMT -5. The time now is 06:51 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration