LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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-2008, 12:10 PM   #1
m_abdelfattah
LQ Newbie
 
Registered: Aug 2008
Posts: 9

Rep: Reputation: 0
Lightbulb SOLVED - Configure Iptables to accept remote http & ftp access


this is my 2nd topic here !

I just installed linux & followed some tutorials to install lighttpd, php & mysql.

now I've CentOS 5.1 on VMWare with 2 connections one bridged and one host only and here are more details :

Windows XP :
Lan IP : 192.168.1.2
VMware Network Adapter VMnet1 : 192.168.71.1

CentOS :
eth0 IP : 192.168.1.12
eth1 IP : 192.168.71.128

Now, when I try to access the web server from Windows I'm getting "Connection Interrupted", but when I stop iptables, I can access fine.

BTW, all I know about iptables is how to stop / start & restart it , so please tell me exactly what steps should I do :$

Last edited by m_abdelfattah; 08-04-2008 at 05:42 AM.
 
Old 08-03-2008, 04:12 PM   #2
walidaly
Member
 
Registered: Mar 2007
Posts: 64

Rep: Reputation: 15
you need to know the IP you are connected from, do
netstat -tap
and find your ip in the Foreign Addresses then do
iptables -A INPUT -s xxx.xxx.xxx.xxx -j ACCEPT
 
Old 08-03-2008, 04:44 PM   #3
m_abdelfattah
LQ Newbie
 
Registered: Aug 2008
Posts: 9

Original Poster
Rep: Reputation: 0
This's my IP in foreign address :S :
::ffff:192.168.:funk-logger

what kind of IP format is this ? and what should I do next ?

**BTW, my ip os 192.168.1.2
and when I followed your command as :
iptables -A INPUT -s 192.168.1.2 -j ACCEPT

nothing happen !!

Last edited by m_abdelfattah; 08-03-2008 at 05:20 PM. Reason: changed ip to 192.168.1.2
 
Old 08-04-2008, 05:36 AM   #4
m_abdelfattah
LQ Newbie
 
Registered: Aug 2008
Posts: 9

Original Poster
Rep: Reputation: 0
I just got the answer from #centos on Freenode, here's it

#system-config-securitylevel

turn the Firewall to "Enabled" and look at the "Trusted Services"
and now it works fine
 
  


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
iptables: local proFTPd server and remote FTP servers access jordib Linux - Networking 2 05-04-2008 02:46 PM
how to configure dovecot&sendmail&postfix to accept other domain email? hocheetiong Linux - Server 3 12-24-2007 03:55 AM
iptables - accept access from NFS clients dekzorro Linux - Networking 2 09-23-2007 02:30 PM
iptables accept ftp port only to specific subnet GUIPenguin Linux - Security 2 09-29-2005 10:24 AM
rh9: configure ports to accept remote connection for azureus bleachie Linux - Software 0 02-16-2004 02:13 PM


All times are GMT -5. The time now is 11:54 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration