Fedora X86/64bit :: Create A Script To Show The Last Time Iptables Had Seen A Given IP Address?

Jun 20, 2009

i was trying to crate a script to show the last time iptables had seen a given IP address (contained in the ipt_recent kernel hook -- my user-defined table name is 'iplist'). The ipt_recent table yields the following information (IPv4 addresses masked for paranoid reasons):

Code:

src=www.xxx.yyy.zzz ttl: 114 last_seen: 9355600126 oldest_pkt: 1 9355600126
src=www.xxx.yyy.zzz ttl: 109 last_seen: 10020040763 oldest_pkt: 1 10020040763
src=www.xxx.yyy.zzz ttl: 111 last_seen: 8106864077 oldest_pkt: 3 8103790647, 8106530788, 8106864077
src=www.xxx.yyy.zzz ttl: 109 last_seen: 9937861664 oldest_pkt: 1 9937861664
src=www.xxx.yyy.zzz ttl: 115 last_seen: 8244867102 oldest_pkt: 1 8244867102

The attempted command used was:

Code:

cat /proc/net/ipt_recent/iplist | awk '{print ($1 ,system("date -d @" $5));}'

Such command yields the following (I'm willing to live with the trailing zero):

Code:

Wed Jun 20 05:48:46 EDT 2266
src=www.xxx.yyy.zzz 0

[code]....

I presume the ipt_recent table uses the standard UNIX epoch timestamp. Am I using the date command syntax incorrectly, is this a 32-bit vs 64-bit break, or it is something else? Please note that I am using FC10, and I have double-checked my system clock settings (both BIOS and OS). The system has only been running during 2009 (no reboot yet).

View 2 Replies


ADVERTISEMENT

Security :: IPTABLES - Restrict Internet Access Based On Time Of Day And MAC Address

Feb 6, 2010

I am trying to configure my Linux router to restrict Internet access for one computer on my LAN. It needs to be restrictive based on the time of day and the days of the week. I am using the MAC address of the computer to single out the one computer that needs to be blocked. However, this is my first attempt at making any rules with iptables, and I am not sure if I am doing this right. If some one can take a look at this I would greatly appreciate it. This is what I have done so far.

Here is my thinking. Create a new target. Check the MAC address, if it is NOT the offending computer return to the default chain. If it is the offending computer check that we are between the allowed hours and dates and ACCEPT. If we are not within the time/date range then drop the packet.

Code:

Here I am trying to route all packets regardless of the computer on the LAN into the blocked_access chain for checking.

Code:

Is it a good idea to route all traffic through the blocked_access chain? I do run other servers that are accessible from the Internet, so I am not sure how this setup will affect that. I also use shorewall on the router to setup iptables for me. How would I integrate this with shorewall?

I am using squid to block access when he is using the web browser. However, he is still able to play games(World of Warcraft) and the like.

I am using Debian sid, iptable(1.4.6), shorewall(4.4.6), kernel 2.6.32-trunk-686.

View 7 Replies View Related

Fedora X86/64bit :: Machine Have 8GB RAM But Only 3.8G Show?

Jul 18, 2011

My machine have 8GB RAM, but only 3.8G,

View 7 Replies View Related

Red Hat / Fedora :: Changing Outgoing DNS (port 53) IP Address With Iptables?

Mar 31, 2009

I need to know what the Iptables "code" is to change the outgoing/Incoming IP for port 53 (DNS). I'm running CentOS on a dedicated server. I very familiar with Putty and SSH. So I don't need much details, I just can't figure this out. I asked my server providor but they deleted my ticket and didn't answer me.I tried this but am not sure if this correct of working?

View 5 Replies View Related

Fedora X86/64bit :: Icons Show Half / Fix It?

Jan 17, 2010

I'm using KDE 4.3.4 with the Desktop Folder View. Some reason my bottom panel show only half of the icon programs i have open. Any ideas how to fix it? I would like for the open programs icon in the panel to show full view.

View 2 Replies View Related

Fedora X86/64bit :: Libvirtd And Lxcstartup Errors After Reboot - No Such Device Or Address

Jan 7, 2011

Unfortunately accidentaly I disconnected my usb drive my computer and my VMs run from so I just rebooted for a quick fix Now I can't open virt-manager locally and the VM's can't get network connections I see this in the logs after the last two reboots

Code:

grep lxc /var/log/messages |tail -n 2
Jan 7 00:45:04 F820 libvirtd: 00:45:04.524: warning : lxcStartup:1895 : Unable to create cgroup for driver: No such device or address
Jan 7 11:52:53 F820 libvirtd: 11:52:53.325: warning : lxcStartup:1895 : Unable to create cgroup for driver: No such device or address

[code]...

I tried restarting libvirtd after with no love so I rebooted and cgroup was gone this was a clean install of F14, after this started I brought the system current, I can provide the packages installed but they errors didnt change

View 1 Replies View Related

Fedora :: Show Clock To Civilian Time?

Nov 12, 2009

By default, Fedora 11 sets my clock to military time. For example it says 16:22. I would like it to show civilian time (or at least know how to do it) I logged into the clock settings and had to put in the root password, but couldn't find where you do this. If you scroll on the time for hours, it just goes from 0 to 23 and back, not to AM and PM like some others.

View 7 Replies View Related

Fedora X86/64bit :: Can't Able To Create More Than 28 Spawn Bash In Core 64 Bit?

Jun 1, 2010

I can't able to create more than 28 spawn bash in fedora core 7 (2.6.25.4 kernel) linux 64 bit machine. I can able to create 1015 spawn bash in 32 bit fedora 7 core. Script I have used for both 32 bit and 64 bit:

[Code]...

View 1 Replies View Related

Fedora Networking :: Having Terrible Time Getting IP Address For Eth0

Dec 19, 2009

I am trying to get networking up on an old PII which I have successfully installed with FC4. There is a link and activity on the onboard interface because I see the indicator lights. The controller is a 3Com PCI 3c905 Boomerang 100baseTx @ 0xdc80.The only message returned by dmesg about eth0 is "Dropping NETIF_F_SG since no checksum feature."The driver module, 3c59x, is loaded as well as the mii module that depends on it.There is something about "unknown parameter`irq'" in the dmesg text regarding the driver.I noticed that eth0 is sharing an IRQ with the UHCI Host Controller.That should not be a problem, but it should not be necessary. And I could do away with USB if this is a conflict and that is the easiest way to solve it.When I drop to console at runlevel 3, and call dhclient, which is installed, I get a message telling me there is no reply to the dhcp request.I don't think the problem is on the router/switch side.

View 5 Replies View Related

Ubuntu :: After Log In Takes Long Time To Show Desktop, Monitor Events At Log In Time?

May 24, 2011

It takes me a while to log in the splash screen just sits there for ages before i get to the desktop. Never used to be this slow and I'm not sure why. Firstly, I'm running Ubuntu 11.04, standard DE. I do have conky starting up in a script but it has the & at the end of the line so I didn't think this would cause it (or is there some special case for log in time on how & is treated?). However as a test I will comment out the line in the script and see if it is the cause.

However just for general knowledge and in case that isn't the problem, how does one go seeing what is happening during the time from when one log's in and the desktop is displayed? Is there some kind of log that shows the date/time that can be enabled or is there a debug mode that can be enabled somehow via special keys or maybe from grub?

View 8 Replies View Related

Red Hat / Fedora :: Edit /etc/sysconfig/iptables And Create/delete Rules Inside That File?

Sep 9, 2010

can i actually edit /etc/sysconfig/iptables and create/delete rules inside that file?will it work? i just find using the IPTABLES -A or -D command a hassle

View 3 Replies View Related

Fedora :: Create Slide Show Movie With Sound?

Oct 7, 2010

actual GUI program, which allows to create slide show movie with sound?

View 14 Replies View Related

Fedora X86/64bit :: 11: Slow Boot Time / Old Western Digital Raptor Drive?

Nov 22, 2009

I'm running a dual partitioned (Vista / Fedora 11 x86_64) Intel X25-M Mainstream SSD.

Whilst Vista boots in about 15 seconds, Fedora takes around twice as long; in fact far longer than Fedora 9 on my old Western Digital Raptor drive.

Is this to be expected, or might I have some sort of configuration problem? Has anyone else had similar experiences?

View 10 Replies View Related

Networking :: Add Ip Address In IPTables?

Nov 11, 2010

How can I add ip address which is multiple of 3 and to 255? That is I want to block ip address which is coming from multiple of 3 to 255.

As an example 192.168.0.3,192.168.0.6,192.168.0.9,192.168.0.12 etc.

View 4 Replies View Related

Ubuntu Security :: Use Address Not Ip In Iptables?

Jul 24, 2010

i need to open this address ftp.nai.com, is there a way to use address not ip in iptables?

View 7 Replies View Related

General :: Iptables Restrict Ssh Session By Mac Address?

May 24, 2011

I'm in the process of restricting access to my Linux production box, where ssh access needs to be limited to only a few MAC addresses.I've followed the instructions outlined in this guide and ran the following two commands:

/sbin/iptables -A INPUT -m mac --mac-source XX:XX:XX:XX:XX:XX -j DROP
/sbin/iptables -A INPUT -p tcp --destination-port 22 -m mac --mac-source XX:XX:XX:XX:XX:XX -j ACCEPT
root@xxxx:~/#: iptables --list

[code]....

View 3 Replies View Related

Networking :: Set Iptables To Forward All On An Aliased Ip Address?

Apr 15, 2009

I have three machines on three networks192.x.x.x10.x.x.x172.x.x.xThe routers are set to forward communication between 192. network and 10. network, and between the 10. network and the 172. network.However, there's not routing between 192. and 172.I want to fix that by using a machine on the 10. network to forward communication between the other two networks.The machine has one etherent connection eth0 whose address is 10.1.1.11I set up an aliased ip address eth0:0 to be 10.1.1.12 using Quote:ifconfig eth0:0 10.1.1.12Then I tried to set forwarding rules the 10. machine such that 10.1.1.12 address will provide access to the machine 172.1.1.55 as followsQuote:# iptables -t nat -A PREROUTING -d 10.1.1.12 -j DNAT --to-destination 172.1.1.55The default policies for all chains is ACCEPT.I then try to access 10.1.1.12 from 192.1.1.20 expecting it to actually access 172.1.1.55 ; it does not work

View 3 Replies View Related

General :: Allow Access To Server From Only 1 IP Address Using Iptables?

Aug 3, 2011

I have a server located remotely that I'd like to protect by allowing access to only my IP address (on any port). Currently anyone can access the server using ssh, http, and any other services that my server is running. (The reason I need to protect it for now is that it's a test/development server and really only needs to be accessed by me.)

The downside of doing this is every time my desktop IP address changes (from where I access the remote server), I would need to update the iptables configuration. (This could be a hassle, but based on my limited knowledge it seems to be the best way to allow access from only myself.)

Could anyone share how to allow access to my server using iptables from only my IP address and on any port?

View 4 Replies View Related

Security :: Blocking An Ip Address Range Within Iptables?

Mar 30, 2009

I am setting up a iptables firewall on one of our servers, and I would like to block a range of addresses from getting into the system. I am using a script that does a BLACKIN and BLACKOUT methodology for specific addresses. One example is the following:

Code:

$IPTABLES -A BLACKIN -s 202.109.114.147 -j DROP
...
$IPTABLES -A BLACKOUT -d 202.109.114.117 -j DROP

What would be the correct syntax to use if I wanted to block an entire remote subnet from getting into the server?

View 4 Replies View Related

Networking :: Stop IPTables To Resolve Source Address?

Oct 25, 2010

Here is a glimpse of my IPTABLES
http://pastebin.com/WvHAC46A
I see in the column of sources the addresses being resolved to domain names is there a way I can stop this?

View 4 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 Port 8080 \ Still Cannot Access Through Ssh Nor Putty And It Doesn't Show Up When Netstat Either?

Jun 6, 2011

I'm trying to open port 8080 on my application server. I've included it in my iptables; however I still cannot access through ssh nor putty and it doesn't show up when I netstat either.Here is my iptables-config:

-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -i eth0 -s xxx.xx.x.0/24 -j ACCEPT

[code].....

View 7 Replies View Related

Fedora X86/64bit :: Catalyst 10.7 And 13x64 - "no Such File Or Directory Couldn't Create Cookie" Get A Black Screen

Jul 26, 2010

I just installed the 10.7 drivers (no workaround they just installed). And now after boot i get a black screen. I have a Radeon HD 4850 there is a way to fix this without reinstalling the OS. Ok in recovery mode when I type Startx i get: line 143: /usr/bin/mcookie: no such file or directory Couldn't create cookie Then if i type Xorg -configure i get : Fatal server error: Cannot open log file "/var/log/Xorg.0.log" Please consult the fedora project support.

View 14 Replies View Related

Networking :: Getting Iptables New Not Syn Log Message More Time?

Jul 21, 2011

I having Iptables log message. It's coming more time. It's can't handle to linux squid.

Firewall -> 192.168.102.2 <iptables>
squid -> 192.168.102.2 <transparent proxy (port 3128)>
error ->
Jul 21 23:58:16 mig [559289.955344] New not syn:IN= OUT=eth0 SRC=192.168.102.2 DST=192.168.102.96 LEN=1500 TOS=0x00 PREC=0x00 TTL=64 ID=53063 DF PROTO=TCP SPT=3128 DPT=1638 WINDOW=11680 RES=0x00 ACK URGP=0
<This message getting all 192.168.102.0/32 network ip's>

getting above message more and move time. can't handle. full network getting slow .squid bandwidth not utilize. but internet slow.

View 1 Replies View Related

Networking :: What Is Command To Show Host Name Of Ip Address?

May 25, 2010

What is the command to show the host name of the ip address?Suppose, I've an ip address like 209.191.122.70, now I want to know its host name.What is the command for that?

View 7 Replies View Related

Software :: Need Command To Show Host Name / IP Address

Jun 16, 2010

I need a command that can show me the HOST-NAME as well as ip-address in a single stress.

View 4 Replies View Related

Programming :: Shared Memory - Should They Show The Same Address?

Mar 17, 2010

So I'll try to be brief and to the point here: I've got a couple of C / C++ apps that communicate with one another via shared memory. These worked completely fine until.. well, about twenty minutes ago when I finished making some network card changes and suddenly, I've got a weird problem going on. At one point, Parent app waits for Child app to set a boolean indicating it's finished initialization. This worked fine the last time I ran this app up (a few days ago). But right now, the shared flag never seems to get triggered (I've added a printf("Waiting..."); in Parent app until the flag is set). All the code leading up to it being set in Child app seem to be running smoothly, so I tried spitting out the addresses of the shared memory locations. The addresses mapped by Parent app and Child app are different; this seemed odd, so I went back and wrote a simple miniature app that just opened a shared structure on my own box, and I get the same thing - different addresses - but the miniature apps work just fine.

Is it normal for a shared memory space to be mapped to two different addresses across two processes?

If so, does anyone have any idea what might be the issue at hand with my Parent / Child app scenario? The Child creates the shared memory, the Parent has a wait before it opens it, and if it doesn't exist should fail (opening with PROT_READ | PROT_WRITE)... it doesn't fail so it's evidently there.

All of this worked until literally just a few hours ago and I made some changes to my network cards, and I can't even imagine how that could have changed whether or not shared memory mapping worked...

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

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

General :: Get IP Address / Ifconfig And Ip Addr Show Are Not Working

Apr 23, 2010

This should be simple, but the machines we ssh into don't seem to have the regular commands.Are there any other simple ways I can use to get my IP?

View 7 Replies View Related







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