LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-12-2007, 06:46 AM   #1
ihtus
LQ Newbie
 
Registered: Mar 2006
Posts: 19

Rep: Reputation: 0
configure iptables for Mail Client only


Hello!

I have Open Suse 10.1 installed with squid!
I have two Network Adapters: internet and intranet
The intranet ip is 192.168.0.90

My aim is to:
1. make a routing of all packets and ports only toward one ip from lan- 192.168.0.91, but not for others!
2. What about other IPs, i want them to have access only for Mail Client: 25 and 110 port. Only these ports! They will access http by proxy connection (squid)

What iptables commands should i run in console for reachinf that aims?


Thanks a lot!

Last edited by ihtus; 11-12-2007 at 03:25 PM.
 
Old 11-13-2007, 01:36 AM   #2
ihtus
LQ Newbie
 
Registered: Mar 2006
Posts: 19

Original Poster
Rep: Reputation: 0
can anyone suggest something?
 
Old 11-13-2007, 06:56 PM   #3
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
#2 should be very easy. What types of testing/commands have you run thus far to try and figure it out?

I'm slightly confused as to what you're trying to do with #1.
 
Old 11-14-2007, 01:30 AM   #4
ihtus
LQ Newbie
 
Registered: Mar 2006
Posts: 19

Original Poster
Rep: Reputation: 0
Hello!
I've found the solution! If anyone has the same problem, here u go:

Goto /etc/sysconfig and edit SuSEfirewall2
Replace

FW_MASQ_NETS="0/0" with
FW_MASQ_NETS="192.168.0.0/24,0/0,tcp,25 192.168.0.0/24,0/0,tcp,110"


Here u open only SMTP (25) and POP3 (110) port! All other ports are closed!
If u want u may allow http access through squid (with all the restrictions), as i did!

After that i tried to restart SuSEfirewall2, i wrote in console this:
/sbin/SuSEfirewall2 start
/sbin/SuSEfirewall2 stop
But there was an error...well i don't know why...

I tried to run Firewall in Yast, i turned off masquerade, pressed ok, accept; and once more time opened Firewall in Yast and turned on masquerade. And now if i run
/sbin/SuSEfirewall2 start
/sbin/SuSEfirewall2 stop
it's no error, and all changes in SuSEfirewall2 didn't dissapear!
Now ur firewall is working properly!

God bless you!
 
  


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
with the linux proxi, backend pop3 mail client can not receive mail and send mail rubin823 Linux - Networking 0 12-21-2006 10:06 PM
how to configure Linux mail client with existing mail server running on WindowsXP? Senthilvnr Linux - Networking 1 07-11-2006 12:02 AM
how to configure mail client to send mail out on different pppd threads vkrishn1 Linux - Newbie 0 12-29-2004 10:54 AM
configure Mozilla 1.6 as mail client inside a LAN htm Linux - Software 2 03-20-2004 08:37 AM
configure kde mail client speedyhot Linux - General 3 03-05-2004 05:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:59 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
Open Source Consulting | Domain Registration