Software :: Iptables: Specifying More Than One Network?

Sep 28, 2010

How can I add one more network to whis statement?iptables -A INPUT -s ! 10.0.0.0/8 -j DROPIt should be something likeiptables -A INPUT -s ! 10.0.0.0/8,192.168.1.0/24 -j DROP

View 2 Replies


ADVERTISEMENT

Ubuntu :: Try `iptables -h' Or 'iptables --help' For More Information - ' Not Found.4.4: Host/network `98.200.58.73

Nov 3, 2010

I recently installed a new Ubuntu PC that runs iptables and PSAD. I had the same script on another Ubuntu PC, but when I copied the script onto the new PC, I got this error. I don't remember where I found the tutorial for this, all I know is that this is the script (Edited for my usage):

Code:

#!/bin/bash
# Script to check important ports on remote webserver
# Copyright (c) 2009 blogama.org
# This script is licensed under GNU GPL version 2.0 or above

[code]....

Safe.txt contains:

Code:

127.0.0.1
192.168.1.8
192.168.1.1
98.200.58.73
192.168.0.1

And the error message generated is:

Code:

root@NETWORK-SERVER:/var/ddosprotect# ./ipblock.sh
' not found.4.4: host/network `127.0.0.1
Try `iptables -h' or 'iptables --help' for more information.
' not found.4.4: host/network `192.168.1.8

[code]....

View 3 Replies View Related

Networking :: Iptables Routing Packets On Same Sub-network

Feb 17, 2010

I am running into trouble while trying to set-up a iptables routing policy. I have two machines on the same sub-network (xxx.xxx.153.0). One of the machines is used as a default gw for the other (xxx.xxx.153.250 is a gateway for xxx.xxx.153.142 and xxx.xxx.153.254 is a gw for xxx.xxx.153.250). There is no explanation for why the xxx.xxx.153.250 is in the middle -- xxx.xxx.153.142 can go straight to xxx.xxx.153.254, but is is like that for now.I am trying to find an iptable rule to be executed on the xxx.xxx.153.250 machine to route the packets.

View 3 Replies View Related

Server :: IPtables And TC To Limit Network Speed

May 14, 2010

I am trying to limit bandwidth of certain ip addresses on my server. I have been doing hours of reading and not getting very far... So far I believe the iptables command is

ptables -A PREROUTING -s 178.33.23.44 -t mangle -j MARK --set-mark 2
ptables -A PREROUTING -s 178.33.23.45 -t mangle -j MARK --set-mark 2
ptables -A PREROUTING -s 178.33.23.46 -t mangle -j MARK --set-mark 2
ptables -A PREROUTING -s 178.33.23.47 -t mangle -j MARK --set-mark 2

and now I just need the tc command to read those marks and limit bandwidth, I have a gigabit connection and would like to limit each of these ip addresses to 10mbit in and out.

View 2 Replies View Related

OpenSUSE Network :: Make The Iptables Rules Permanent?

Apr 23, 2010

I set up a squid transparent proxy and I have a problem with an iptable rules. I have a rule to redirect all request to port 80 to go on port 3128. To do so, I'm using this iptables command :

Code:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128

This command is working like a charm. The only problem is, for some unknown reasons, this rule will be dropped at some point. I did not manage to identify what is causing this to happen. It occurs during night, but I have nothing about that in my log files. messages / firewall / ...) The only way I managed to reproduce this 'dropping' is this one: I type the command like as root. The command is effective and working fine. I open yast, I go to the firewall module, the I do a simple "save changes and restart firewall" (without changing anything). As soon as this process is finished, the iptables rule is gone.

-How can I make this rule permanent ?

-Is there a place where I can launch a script executing this rule, after the yast firewall module is 'touched' or something ?

View 3 Replies View Related

OpenSUSE Network :: Block All Ports But Port 80 With Iptables (DMZ)?

Jun 25, 2010

I have a Suse 10.3 router with 4 network cards. 1 is to connect to the big network and thereby also the internet, 2 are for 'client' subnets and I want to use the last one as a DMZ. In this DMZ will be a web server which has to be accessible from the other 2 subnets and from the big network. I could do it with a few simple clicks in Yast firewall, but I have some issues with this firewall and there for I want to use it as minimal as possible, using Iptables.

So now I'm struggling a bit with Iptables. Basicly what I'm looking for is how to block all ports but 80 in this last subnet with iptables.

View 5 Replies View Related

OpenSUSE Network :: Firewall2 And Iptables String Module?

Oct 28, 2010

I am trying to setup a scenario where I am able to control the access to certain html files. I'd like forbid access to the URL: url

my iptables rule in "SuSEfirewall2-custom" looks like:

iptables -I INPUT -j DROP -p tcp -m string --string ".*test.*" -algo bm
--dport $port

As a result, I get:
#> rcSuSEfirewall2 start
Starting Firewall Initialization (phase 2 of 2) Bad argument `--string'

(same for "-string")

View 5 Replies View Related

OpenSUSE Network :: Calling All 11.3 Firewall And Iptables Experts?

Jul 25, 2011

I am in the process of enabling Samba client and server on my opensuse 11.3 32-bit workstation, and have just looked at the firewall rules (via iptables -L) prior to enabling these applications.I have used iptables a lot before and despite having my network interface defined as being in the External Zone (ie the least trusted, and therefore supposedly the most protected), the first rules in iptables are as follows:

INPUT
target=ACCEPT, prot=all, source=anywhere, dest=anywhere
OUTPUT

[code]....

View 3 Replies View Related

Ubuntu Security :: Iptables V1.4.4: Host/network `222-208-183-218' Not Found

Jun 18, 2010

I am running a desktop not a server. As far as i am aware of no server stuff is installed or tunning that does not come with the standard ubuntu 10.04 install. I tried using sudo iptables -A INPUT -s xx.xx.xx.xx -j DROP , it works sometines , then sometimes it does not. Some that it seems to block just come back in about 15 to 20 minutes. On this one in particular i get the following error :

sudo iptables -A INPUT -s 222-208-183-218 -j DROP
iptables v1.4.4: host/network `222-208-183-218' not found
Try `iptables -h' or 'iptables --help' for more information.

View 2 Replies View Related

Networking :: Iptables Rules For Filtering Network Traffice?

Jan 26, 2010

Does anyone have tips about iptables rules for filtering network traffice?

View 2 Replies View Related

General :: Iptables Doesn't Work On Private Network

Mar 27, 2011

I have 2 different networks: the first one is gateway machine (eth0), and the second is a private machine (eth1). So, I've configured the iptables and forwarding stuff and when I try to ping [URL]... on the gateway machine, it works, while it doesn't work on the private network.

View 7 Replies View Related

Security :: IPtables Limit SSH From Local Network To Internet

Feb 24, 2010

I have a linux firewall. I want to limit a ssh connection number from local network to internet .

Example :
Internal pc (192.168.0.10) start a ssh scan to the external (internet) host.

I want that iptables limit that host (192.168.0.10) and block ssh connection from this host at 3 attempt.

View 2 Replies View Related

Ubuntu Networking :: Redirect Network Traffic To A New IP Address Using IPtables?

Jun 19, 2011

how to redirect network traffic to a new IP address using IPtables. I am using Baffalo router and the rtos used is DD-WRT. Basically, I want it so that any connection going through my router to a specific IP (say, 192.168.11.5) will be redirected to another IP (say, 192.168.11.7) so any outgoing connections made by a program that is attempting to connect to192.168.11.5 will instead connect to 192.168.11.7.

View 2 Replies View Related

Security :: IPTABLES Vs Other Firewalls / All Network Connections That Come In To Services That Do Not Use TCP Wrappers?

Jul 23, 2010

I'm having problems with hackers from across the globe trying to get into our servers. Why? i have no clue. nothing of value in my servers worth getting.

Right now my service only does business with USA. So I'm trying to find a way to block all Non USA traffic. I called my hosting provider and they are unable to help. Said it was up to me to do this.

Well I've already taken care of the TCP Wrappers. by spawning a small C program i made that uses MaxMind's GeoIP system. to automatically deny access. Now i need to do something about all the other network connections that come in to services that do not use the TCP wrappers.

So i was wondering if IPTABLES have a way to spawn a sub proccess like TCP wrappers or if there was any other firewall software out there for linux that would let me achieve my goal.

View 10 Replies View Related

Ubuntu Servers :: IPTables Rules To Administer Entire Network Via Wireless

Jul 7, 2010

I have a set of iptables I have downloaded and modified for my use. I had it working for 1 lan and wan access. I now would like to have: wan access, 1 lan, and 1 wlan. I need to administer the entire network from my wireless laptop on the wlan network so I need to be able to access the lan from the wlan network, and have the wlan access the lan network. Here are my rules:

#!/bin/sh
# IPTABLES FIREWALL script for the Linux 2.6 kernel.
# This script is a derivitive of the script presented in
# the IP Masquerade HOWTO page at: [URL]
# It was simplified to coincide with the configuration of the sample system presented in the Guides section of [URL]
# This script is presented as an example for testing only and should not be used on a production firewall .....
echo -e " Firewall server rule loading complete "

View 3 Replies View Related

Red Hat / Fedora :: Iptables And Forwarding Stuff Doesn't Work On The Private Network

Mar 27, 2011

I have 2 different networks: the first one is gateway machine (eth0), and the second is a private machine (eth1). So, I've configured the iptables and forwarding stuff and when I try to ping google.com on the gateway machine, it works, while it doesn't work on the private network. Note: I am using VmWare 7. I need your quick assistance about this issue.

View 2 Replies View Related

Fedora Servers :: Unable To Restore My Iptables From Iptables-save After Upgrading

Nov 26, 2010

I am unable to restore my iptables from iptables-save after upgrading Fedora. I cannot get iptables-restore to work, and I have resorted to entering rules manually using the GUI.

View 2 Replies View Related

General :: When Restart The Iptables Service Then The Firewall Entries Are Again Shown In Iptables?

Sep 17, 2010

I am facing a strange problem witht my iptables as there are some firewall entries stored somewhere which is displaying the below firewall entries even after flushing the iptables & when I restart the iptables service then the firewall entries are again shown in my iptables as shown below,

[root@myhome ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

[code]....

View 6 Replies View Related

Fedora :: IPtables Creates An Error During Startup - Applying Firewall Rules: Iptables-restore: Line 21 Failed

Jul 17, 2010

IPtables creates an error during startup as well as when I try to restart it: Here's the output of:

[Code]....

View 11 Replies View Related

Ubuntu Servers :: Setup Iptables Rules In /etc/if-up.d/iptables?

Apr 16, 2011

I am running Ubuntu server 10.10 and trying to setup iptables rules in /etc/if-up.d/iptables

Quote:
root@host# cat /etc/network/if-up.d/iptables
#!/bin/sh -e
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

Problem is that iptables doesn't get updated and I don't see them when iptables -L is executed after reboot.

View 2 Replies View Related

CentOS 5 :: Custom Iptables: Remove The Existing Iptables First?

Apr 28, 2009

To expand: I'm trying to set up a box with l7-filter, and I need to patch and compile iptables 1.4.1.1 as part of the process. I ./configured it with the prefix= argument so it would install into /sbin instead of /usr/sbin, and I did a yum remove iptables before installing it so as not to get in the way of the original iptables, but I'm wondering if this is really necessary - it's kind of annoying, because removing the original iptables removes the init.d script, deregisters the service, etc. If I don't, is it possible that iptables 1.4.1.1 might get overwritten in a system update or something, or will yum see that I've got a custom/newer version in there and leave it be?

View 4 Replies View Related

Red Hat / Fedora :: Best Book For IPTABLES Contains Everything Of Iptables

Jun 18, 2011

I am going to start studying IPTABLES for Linux Firewall. Can any one suggest me the best Book for IPTABLES contains everything of iptables.

View 2 Replies View Related

General :: Save Iptables When Iptables-save Doesn't Exist?

Apr 14, 2011

I'm working on a Soekris net4801 that is running an unknown distro of Linux. The kernel is 2.4.29, and iptables is v1.3.4.

I can't work out how to save the iptables. I searched the whole system for files/folders containing the name "iptables" and got 3 results:

/user/local/lib/iptables
/sbin/iptables
/lib/iptables

I've tried iptables save, iptables-save and iptables save active.

"iptables save" and "iptables save active" give me an invalid argument error. "iptables-save" isn't a valid command. "iptables --help" gives me a list of valid switches, none of which have to do with saving.

how I can save the iptables?

View 1 Replies View Related

OpenSUSE Network :: Can't Find Network Hard Driver On Network?

Oct 31, 2010

On Linux Mint (Gnome) i used to go to Network drive. that is on the right hand side of Nautilus there is a short cut for Network. in there i could see my network hard drive and other laptops connected to the network, and i could access my files. but on OpenSuse, when i open the network folder, nothing comes up. may be it needs some sort of configuration.

View 2 Replies View Related

General :: Using DNS In Iptables?

Aug 16, 2010

I need to use hostnames in my iptables. When I go to restart iptables, it works fine but when I am rebooting the Linux server it fails during startup since the name service is started up after the iptables. Does anybody have recommendations to get around that? Should I set up a script to run the iptables after everything the server comes back up fully?

View 1 Replies View Related

Debian :: How To Set Iptables With Config

Feb 18, 2015

I`d like to block bruteforce attack from china, russia to my mysql and i want to open 3306 mysql port just for one type adress from internet like this:: 212.23.165.xxx, and for others I want to block just for 3306.In my new installaton of weezy I`ve not configured iptables..how should looks like iptables config and how to set iptables with this config?

View 3 Replies View Related

Fedora Security :: Allow DNS In Iptables

Feb 1, 2009

I have been struggling with this for a very long time now. I have installed Fedora Core 9 on my computer. I have set it up as a caching-nameserver and this is working.

Then I wanted to secure my server with iptables, and I have so far made this script:

# Load the connection tracker kernel module
modprobe ip_conntrack
iptables -F
iptables -P INPUT DROP
iptables -P FORWARD DROP

[Code]....

I can reach the dns server with ping. When trying Nslookup it says that it got SERVFAIL from 127.0.0.1 trying next server, and then it times out.

My resolv.conf file lists:

nameserver 127.0.0.1
nameserver DNS-server

View 13 Replies View Related

Fedora :: F12 - How Can Iptables Be So Entrenched

Nov 21, 2009

To remove it, 238 packages have to go. There are so may the board won't even allow me to post them all. [URL]

View 14 Replies View Related

Fedora Security :: Can't Get FTP Through Iptables

Dec 14, 2009

Im pulling my hair out trying to get ftp to work through iptables.Im using vsftpd

Table: filter
Chain INPUT (policy DROP)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
2 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED

[code].....

View 3 Replies View Related

Ubuntu :: Using UFW To Configure Iptables?

Mar 12, 2010

I've got a machine on my network that's just running default Ubuntu 9.10, but I was considering setting up a network dhcp service on it to manage my machines. As such I was just wondering about configuring the iptables for it.

Reading about, I believe all incoming connections are dropped by default in a standard installation of Ubuntu anyway. If so, is it simply a case of enabling UFW and using it to allow the appropriate port for the dhcpd service and not touching anything else and everything should remain secure?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved