LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-30-2012, 06:13 AM   #1
papa2ae
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Rep: Reputation: Disabled
OpenVZ/Centos Port FIltering (Host Node)


On my openvz host node, I have blocked port 25 using the following command ..

iptables -A FORWARD -j DROP -p tcp --destination-port 25

This is fine, but it blocks the port for all the containers.

Therefore, I have tried something like this, although it is listed in iptables -L, the connection cant be made. (Tried to check via telnet)

iptables -I FORWARD --source 7.5.4.7 --protocol tcp --destination-port 25

OR

iptables -I FORWARD --source 7.5.4.7 --protocol tcp --destination-port 25 -j ACCEPT

Any idea what is wrong?

PS. The block command is in the end, and nothing is below it. So this shouldn't be a problem. And if there is a way to block instead of allow, that will be fine too.

Thanks
papa2ae

Last edited by papa2ae; 08-30-2012 at 06:15 AM.
 
Old 08-30-2012, 09:21 AM   #2
seeberg
LQ Newbie
 
Registered: Sep 2010
Posts: 14

Rep: Reputation: 3
If you are using bridged networking iptables don't act as you expect. Try searching "ebtables bridged networking"
 
Old 09-01-2012, 10:33 AM   #3
papa2ae
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
But if the top command works fine, why doesn't the second one work the way it is meant to?

It has always worked for me ...

And no, not using a bridged network setup

Last edited by papa2ae; 09-01-2012 at 10:34 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Best host OS for OpenVZ, any recommendation? sokha Linux - Virtualization and Cloud 7 01-03-2013 06:42 PM
LXer: Installing And Using OpenVZ On CentOS 6.3 LXer Syndicated Linux News 0 08-05-2012 09:01 AM
IPtables to map Virtual Host IP Port 22 on same physical host to alternate port edi_corey Linux - Networking 1 05-04-2012 11:08 AM
openvz node with only one vps rpereyra Linux - Virtualization and Cloud 3 06-06-2011 10:10 AM
how can install openvz on centos 5.4 64 bit ? showshow Linux - Server 1 03-24-2010 02:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:44 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