Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Linux iptables -> is it possible? Post 302727159 by Kekox on Tuesday 6th of November 2012 12:52:42 AM
Old 11-06-2012
Linux iptables -> is it possible?

Hi!
I have a dedicated hosting working with 2 ips.

Is it possible to block all connections but 1 in all existing ports for only 1 of my ips?

I mean like, I have 2 ips for example: 190.x.x.5 and 190.x.x.6
I want that all the connections going to 190.x.x.6 in all ports get rejected but only 1 connection, my laptop ip which is (example) 80.x.x.1
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to configure a linux box as a firewall using iptables

I have already compiled the kernel and configured it to run as a firewall. My computer has 2 NICs and is on two seperate networks. I can ping both networks from my computer, but workstations on one network can not ping workstations on the other. What Scripts or commands do I need to install ? (2 Replies)
Discussion started by: Deuce
2 Replies

2. UNIX for Advanced & Expert Users

LINUX 9 IPTABLES and DNS

I have installed a linux 9 router/firewall and have issues with outside DNS queries making it in. here are my IPTABLE rules, can anyone make some suggestions? ETH1 is my outside facing Interface, ETH0 is my inside facing interface. Accept If input interface is not eth1 Accept If protocol is... (1 Reply)
Discussion started by: frankkahle
1 Replies

3. Linux

LINUX 9 IPTABLES and DNS

I have installed a linux 9 router/firewall and have issues with outside DNS queries making it in. here are my IPTABLE rules, can anyone make some suggestions? ETH1 is my outside facing Interface, ETH0 is my inside facing interface. Accept If input interface is not eth1 Accept If protocol... (6 Replies)
Discussion started by: frankkahle
6 Replies

4. UNIX for Dummies Questions & Answers

Linux IPTABLES help

I'm new to Linux and I made a big mistake at work recently locking myself out of our own server :(. I did iptables -F first as the tutorial said and then entered the rules. I wanted to start over again so I did iptables -F and it locked us out. We had to get someone to physically restart... (0 Replies)
Discussion started by: nogumo
0 Replies

5. Cybersecurity

Help needed in IPTables firewall/router setup - Linux

HI all, I have setup IPTables firewall/Router and my home network, with address space 192.168.10.XXX Form my private network hosts, i can ping the gateway ( 192.168.10.101 ) , but the reverse is not happening. Can someone help me as of what i need to do, so that i can ping my private... (1 Reply)
Discussion started by: chandan_m
1 Replies

6. Cybersecurity

[Linux] Blocking Your w00tw00ts with iptables

I noticed a few w00tw00ts in our Apache2 logfile the other day, so I thought I would write a quick post on blocking them with iptables. Feel free to improve upon any of my scripts or ideas in this thread. First of all, what is a w00tw00t and where might we find one? Well, a w00tw00t is an... (10 Replies)
Discussion started by: Neo
10 Replies

7. Cybersecurity

Replace Sonicwall with linux box using iptables

Hello, I am currently using a Sonicwall firewall to protect a class C network of public IP addresses. The sonicwall allows me to specify which IP's will be on the DMZ port and the remainder are on the LAN port by default. I would like to replace this Sonicwall with a linux box and use iptables... (3 Replies)
Discussion started by: richard987
3 Replies

8. Homework & Coursework Questions

iptables producing 'Unknown error 18446744073709551615' inRed Hat Enterprise Linux Server 5.5

Creating a large number of rules such as 100000, iptables will produce errors after 42000 rules "iptables: Unknown error 18446744073709551615". But another machine where i have debian virtual machine I can easily run the sciprt of 100000 of rules I am waiting for your reply 4.... (1 Reply)
Discussion started by: tahirfattani
1 Replies

9. Debian

Linux outbound traffic filtering with: cgroups + tc + iptables

I spent a lot of time trying to implement outbound traffic filtering with: cgroups + tc + iptables on Debian Jessie. Unfortunately there is still something wrong. The biggest issue is: - cgroups install + config - net_cls subsystem implementation - packets marking with net_cls - appropriate... (0 Replies)
Discussion started by: Novi
0 Replies
hack_array(7rheolef)						    rheolef-6.1 					      hack_array(7rheolef)

NAME
hack_array - container in distributed environment (rheolef-6.1) SYNOPSYS
STL-like vector container for a distributed memory machine model. Contrarily to array<T>, here T can have a size only known at compile time. This class is used when T is a geo_element raw class, i.e. T=geo_element_e_raw. The size of the geo_element depends upon the oder and is known only at run-time. For efficiency purpose, the hack_array allocate all geo_elements of the same variant (e.g. edge) and order in a contiguous area, since the coreesponding element size is constant. EXAMPLE
A sample usage of the class is: std::pair<size_t,size_t> param (reference_element::t, 3); // triangle, order=3 hack_array<geo_element_raw> x (distributor(100), param); The hack_array<T> interface is similar to those of the array<T> one. OBJECT REQUIREMENT
There are many pre-requises for the template objet type T: class T : public T::generic_type { typedef variant_type; typedef raw_type; typedef genetic_type; typedef automatic_type; static const variant_type _variant; static size_t _data_size(const parameter_type& param); static size_t _value_size(const parameter_type& param); }; class T::automatic_type : public T::generic_type { automatic_type (const parameter_type& param); }; class T::generic_type { typedef raw_type; typedef iterator; typedef const_iterator; iterator _data_begin(); const_iterator _data_begin() const; }; ostream& operator<< (ostream&, const T::generic_type&); IMPLEMENTATION
template <class T, class A> class hack_array<T,sequential,A> : public smart_pointer<hack_array_seq_rep<T,A> > { public: // typedefs: typedef hack_array_seq_rep<T,A> rep; typedef smart_pointer<rep> base; typedef sequential memory_type; typedef typename rep::size_type size_type; typedef typename rep::value_type value_type; typedef typename rep::reference reference; typedef typename rep::dis_reference dis_reference; typedef typename rep::iterator iterator; typedef typename rep::const_reference const_reference; typedef typename rep::const_iterator const_iterator; typedef typename rep::parameter_type parameter_type; // allocators: hack_array (const A& alloc = A()); hack_array (size_type loc_size, const parameter_type& param, const A& alloc = A()); void resize (const distributor& ownership, const parameter_type& param); hack_array (const distributor& ownership, const parameter_type& param, const A& alloc = A()); void resize (size_type loc_size, const parameter_type& param); // local accessors & modifiers: A get_allocator() const { return base::data().get_allocator(); } size_type size () const { return base::data().size(); } size_type dis_size () const { return base::data().dis_size(); } const distributor& ownership() const { return base::data().ownership(); } const communicator& comm() const { return ownership().comm(); } reference operator[] (size_type i) { return base::data().operator[] (i); } const_reference operator[] (size_type i) const { return base::data().operator[] (i); } iterator begin() { return base::data().begin(); } const_iterator begin() const { return base::data().begin(); } iterator end() { return base::data().end(); } const_iterator end() const { return base::data().end(); } // global modifiers (for compatibility with distributed interface): dis_reference dis_entry (size_type dis_i) { return operator[] (dis_i); } void dis_entry_assembly() {} template<class SetOp> void dis_entry_assembly(SetOp my_set_op) {} template<class SetOp> void dis_entry_assembly_begin (SetOp my_set_op) {} template<class SetOp> void dis_entry_assembly_end (SetOp my_set_op) {} // apply a partition: #ifdef TODO template<class RepSize> void repartition ( // old_numbering for *this const RepSize& partition, // old_ownership hack_array<T,sequential,A>& new_array, // new_ownership (created) RepSize& old_numbering, // new_ownership RepSize& new_numbering) const // old_ownership { return base::data().repartition (partition, new_array, old_numbering, new_numbering); } template<class RepSize> void permutation_apply ( // old_numbering for *this const RepSize& new_numbering, // old_ownership hack_array<T,sequential,A>& new_array) const // new_ownership (already allocated) { return base::data().permutation_apply (new_numbering, new_array); } #endif // TODO // i/o: odiststream& put_values (odiststream& ops) const { return base::data().put_values(ops); } idiststream& get_values (idiststream& ips) { return base::data().get_values(ips); } template <class GetFunction> idiststream& get_values (idiststream& ips, GetFunction get_element) { return base::data().get_values(ips, get_element); } template <class PutFunction> odiststream& put_values (odiststream& ops, PutFunction put_element) const { return base::data().put_values(ops, put_element); } #ifdef TODO void dump (std::string name) const { return base::data().dump(name); } #endif // TODO }; IMPLEMENTATION
template <class T, class A> class hack_array<T,distributed,A> : public smart_pointer<hack_array_mpi_rep<T,A> > { public: // typedefs: typedef hack_array_mpi_rep<T,A> rep; typedef smart_pointer<rep> base; typedef distributed memory_type; typedef typename rep::size_type size_type; typedef typename rep::value_type value_type; typedef typename rep::reference reference; typedef typename rep::dis_reference dis_reference; typedef typename rep::iterator iterator; typedef typename rep::parameter_type parameter_type; typedef typename rep::const_reference const_reference; typedef typename rep::const_iterator const_iterator; typedef typename rep::scatter_map_type scatter_map_type; // allocators: hack_array (const A& alloc = A()); hack_array (const distributor& ownership, const parameter_type& param, const A& alloc = A()); void resize (const distributor& ownership, const parameter_type& param); // local accessors & modifiers: A get_allocator() const { return base::data().get_allocator(); } size_type size () const { return base::data().size(); } size_type dis_size () const { return base::data().dis_size(); } const distributor& ownership() const { return base::data().ownership(); } const communicator& comm() const { return base::data().comm(); } reference operator[] (size_type i) { return base::data().operator[] (i); } const_reference operator[] (size_type i) const { return base::data().operator[] (i); } iterator begin() { return base::data().begin(); } const_iterator begin() const { return base::data().begin(); } iterator end() { return base::data().end(); } const_iterator end() const { return base::data().end(); } // global accessor: template<class Set, class Map> void append_dis_entry (const Set& ext_idx_set, Map& ext_idx_map) const { base::data().append_dis_entry (ext_idx_set, ext_idx_map); } template<class Set, class Map> void get_dis_entry (const Set& ext_idx_set, Map& ext_idx_map) const { base::data().get_dis_entry (ext_idx_set, ext_idx_map); } template<class Set> void append_dis_indexes (const Set& ext_idx_set) { base::data().append_dis_indexes (ext_idx_set); } template<class Set> void set_dis_indexes (const Set& ext_idx_set) { base::data().set_dis_indexes (ext_idx_set); } const_reference dis_at (size_type dis_i) const { return base::data().dis_at (dis_i); } // get all external pairs (dis_i, values): const scatter_map_type& get_dis_map_entries() const { return base::data().get_dis_map_entries(); } // global modifiers (for compatibility with distributed interface): dis_reference dis_entry (size_type dis_i) { return base::data().dis_entry(dis_i); } void dis_entry_assembly() { return base::data().dis_entry_assembly(); } template<class SetOp> void dis_entry_assembly (SetOp my_set_op) { return base::data().dis_entry_assembly (my_set_op); } template<class SetOp> void dis_entry_assembly_begin (SetOp my_set_op) { return base::data().dis_entry_assembly_begin (my_set_op); } template<class SetOp> void dis_entry_assembly_end (SetOp my_set_op) { return base::data().dis_entry_assembly_end (my_set_op); } // apply a partition: template<class RepSize> void repartition ( // old_numbering for *this const RepSize& partition, // old_ownership hack_array<T,distributed>& new_array, // new_ownership (created) RepSize& old_numbering, // new_ownership RepSize& new_numbering) const // old_ownership { return base::data().repartition (partition.data(), new_array.data(), old_numbering.data(), new_numbering.data()); } #ifdef TODO template<class RepSize> void permutation_apply ( // old_numbering for *this const RepSize& new_numbering, // old_ownership hack_array<T,distributed,A>& new_array) const // new_ownership (already allocated) { base::data().permutation_apply (new_numbering.data(), new_array.data()); } void reverse_permutation ( // old_ownership for *this=iold2dis_inew hack_array<size_type,distributed,A>& inew2dis_iold) const // new_ownership { base::data().reverse_permutation (inew2dis_iold.data()); } #endif // TODO // i/o: odiststream& put_values (odiststream& ops) const { return base::data().put_values(ops); } idiststream& get_values (idiststream& ips) { return base::data().get_values(ips); } #ifdef TODO void dump (std::string name) const { return base::data().dump(name); } #endif // TODO template <class GetFunction> idiststream& get_values (idiststream& ips, GetFunction get_element) { return base::data().get_values(ips, get_element); } template <class PutFunction> odiststream& put_values (odiststream& ops, PutFunction put_element) const { return base::data().put_values(ops, put_element); } template <class PutFunction, class Permutation> odiststream& permuted_put_values ( odiststream& ops, const Permutation& perm, PutFunction put_element) const { return base::data().permuted_put_values (ops, perm.data(), put_element); } }; rheolef-6.1 rheolef-6.1 hack_array(7rheolef)
All times are GMT -4. The time now is 06:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy