Ubuntu :: Switching From UFW To Iptables
Dec 20, 2010
So I've used UFW for quite some time now and its been great. But I'm thinking its time to take the plunge into iptables. I want to start blocking repeated connections from IPs trying to brute force my SSH.
I've been reading up on iptables, and it doesn't seem too bad. But I have a few questions I'm hoping people can help with.
1) If I've been using UFW, do I need to do anything special to switch to iptables. I was just going to do "ufw disable". But do I need to uninstall it, or something special. Because even when I do ufw disable, there are still lines in the iptables talking about ufw.
2) regarding those lines, do I need to get rid of them? Is there a way to revert the iptables back to default? These are the lines.
Code:
3) I've read some things that the order of rules in the "chain" matters, but I don't fully understand it. Does it just mean that whatever comes first within the chain takes precedence? So does that mean that if I want to add a new rule, I can't just add it, but I have to make sure it gets listed in the right order?
4) I don't fully understand what these "chains" are either. I can kind of understand the three main ones, INPUT, FORWARD and OUTPUT. But then ufw seems to have added a lot of other ones. What are those?
5) again on chains, if I add a drop IP to the INPUT chain. From my understanding it prevents it from connecting to you. Do I need to put it in the forward chain also? Or just worry about the input chain to prevent connections to me.
View 5 Replies
ADVERTISEMENT
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
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
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
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
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
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
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
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
Mar 22, 2010
I got a new 64 bit computer and in my infinite wisdom I installed the server edition of Ubuntu 9.10. I managed to correct that issue and now I'm running the 32 bit version of Ubuntu on my new machine on a dual boot with Windows7.
What I'm wondering is if there is a way that I could possibly switch to the 64 bit version of Ubuntu 9.10 and still be able to boot my Windows OS. I know that I could remove the 32 bit Ubuntu and start fresh, but I'm concerned that if I do that I might not be able to boot the Windows OS, due to the replacement of the Windows boot with GRUB.
View 2 Replies
View Related
Aug 21, 2010
So I did a
Code:
sudo apt-get install ubuntu-desktop && sudo apt-get purge ubuntu-netbook*
To switch from UNR to the Desktop version.
Everything is fine except for the fact that when I have a maximized window, I do not have the minimize, maximize, and close buttons.
I have a feeling I just need to tweak something in gconf-editor, but I can't seem to find the correct setting.
View 3 Replies
View Related
Oct 4, 2010
I'm switching over to Ubuntu 10.04.1 from Windows 7. I mostly use my computer for surfing the web and doing school assignments, but I'm sick of getting viruses and such on Windows 7.
View 6 Replies
View Related
Nov 26, 2010
I'm running kubuntu, 10.10, 64 bit on my ASUS X59GL, with 4Gb ram - and NVIDIA on board GeForce 8200m.
I'm running KDE with compositing switched on - trouble is that it keeps saying Desktop effects are too slow and compositing is suspended. Surely this setup is powerful enough - this seems to be getting worse with each subsequent release - (a couple of releases ago, this didn't happen).
It's just happened again, and all I'm running is Firefox, nautilus, skype and dropbox (all but firefox are minimised), and uptime load average is .3 Is anyone else experiencing this problem?
Is there any 'ratings' as to how 'expensive' each of the effects are? - i.e. which are the least impact, and which are the most?
View 3 Replies
View Related
Nov 26, 2010
I currently run Linux Mint 9/GNOME on my main desktop but am thinking of switching to KDE. The main reason being that the file managers seem to have more to offer than anything in GNOME and the DE itself just seems to look better.
So the question is, if I switch, what issues am I likely to run into? I would like to continue using as many of the same programs as possible and I know that a lot of them are going to require GNOME dependencies and either might not run or will run slow, but I'm not very Linux savvy and don't know much beyond that.
I would like to still use Compiz, Guayadeque, and a few other programs. If I am going to loose the ability to run a lot of programs I am use to just to get the nicer file browser and DE then it's probably not worth it.
I'm pretty familiar with GNOME now so I'm looking for some advice from KDE users, especially if you started with GNOME.
View 9 Replies
View Related
Dec 2, 2010
I am trying to switch from gcc-4.4 (defaut with the "sudo apt-get install build-essential" command) to gcc-4.1
I was able to install gcc-4.1 using sudo apt-get install gcc-4.1 The command "which gcc-4.1" gives "/usr/bin/gcc-4.1" I suppose this means that it is properly installed. I was also able to uninstall gcc-4.4 using "sudo apt-get remove gcc-4.4" However, the command "gcc --version" gives "/usr/bin/gcc: No such file or directory" This is because the gcc file(?) is named gcc-4.1. A name change should work, I think. But I do not have the rights to rename this file (after right clicking, "rename" is inaccessable).
Is there some way to use sudo apt-get install gcc-4.1 and make it install into/usr/bin/gcc to avoid these issues?
Or maybe direct the OS to usr/bin/gcc-4.1 rather than usr/bin/gcc?
View 1 Replies
View Related
Jan 11, 2011
Is there a easy to switch between gnome and kde like there is in fedora? I would like to use kde instead gnome. [URL]
View 3 Replies
View Related
May 7, 2010
I switched to Ubuntu with a clean install and whipped out the Mac OS X. I now want to switch back to this and I have the .dmg file on my flash drive with the OS X on it. I was wondering how I would go in installing this since it is a .dmg file and since it needs to be installed.
View 9 Replies
View Related
Jan 6, 2010
I am a new Ubuntu user (three months so far on Karmic amd64, and very happy with my new OS). I had to do a force shutdown after a system freeze (while viewing video on my tv - dual display - with vlc). Upon restart, I noticed the network connection icon missing from the taskbar; there was an empty "slot" between the evolution and sound icons so I figured the network icon was simply not appearing correctly.
I right clicked in that empty "slot" and chose to remove from taskbar with the intention of putting it back. After clicking remove, the taskbar started a cycle of constant disappear and reappear (about one second between each). The cycle is too fast to allow navigating in menus but I can access the terminal. Being new and all, I don't know how to configure the taskbar through the terminal... fix my taskbar in the terminal?
View 1 Replies
View Related
Jan 13, 2010
Recently I noticed my hard drive sounding like it was repeatedly clicking off and then immediately spinning back up. Obviously, this doesn't sound like it is very good for the hard drive, and may be the cause of my computer locking up the other night.
I believe the affected hard drive is a Seagate 1TB SATA drive I bought this past summer, which is connected to the on-board SATA controller (SiLabs, I think?). Here is the dmesg output from when the problem started occurring.
Code:
[ 1385.157814] ata1: exception Emask 0x10 SAct 0x0 SErr 0x90000 action 0xe frozen
[ 1385.157824] ata1: SError: { PHYRdyChg 10B8B }
[ 1385.157835] ata1: hard resetting link
[ 1389.300273] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 1389.406471] ata1.00: configured for UDMA/100
[ 1389.406484] ata1: EH complete
[Code]...
View 2 Replies
View Related
Mar 16, 2010
Thinking of uninstalling GNOME/ubuntu-desktop and installing LXDE/lubuntu-desktop in its place. Just a couple of Qs. Got some hunches, just want to confirm/deny them:
* Does LXDE use GDM for login, or something else?
* Installing lubuntu-desktop would uninstall network-manager. Need to reboot if I do this, I take it?
View 9 Replies
View Related
Apr 12, 2010
Basically I've just installed Ubuntu 9.10 on an old Acer Aspire 3000 laptop. When I first did the install I observed that the screen color depth was very low so after browsing the forums I ran the latest updates and then everything was perfect.
However after a restart the color depth reverted back to low. I created an xorg.conf file and set the default depth to 24. However no luck. I then set the color depth to 16 in this file and restarted. This time it switched to the 16 bit color depth, however after a restart again it all reverted back! I tried changing the value again but it is now stuck at the low color depth again.
The driver I am using is the updated SIS driver that was provided from Ubuntu for the onboard 661 SIS video card.
View 3 Replies
View Related
May 14, 2010
I am looking at switching from the 10.04 desktop version to the netbook remix version.I was wondering the easiest way to do this, and if I will lose all my files in the process.. I have an Acer Aspire One A0532H-2254 10.1" and a lot of Windows wont fit in my smaller screen, which is extremely frustrating.Also, if doing so would cause me to lose all my files, best way to back up about 56 Gigs of movies and music?
View 2 Replies
View Related
Jun 6, 2010
I've got an i5 Macbook Pro, on which I've got Ubuntu 10.04, which I use 90% of the time (mainly for work).
I've added a few lines to xorg.conf to make the graphic card run cooler and thus get some more battery life. Sometimes, though, I do need full graphic potential, for which I have another xorg.conf prepared without those lines, so I can switch back and forth when I need it.
Currently, to change back and forth, I rename the files accordingly and reboot, which is a pain in the neck. I tried restarting gdm after switching files instead but it didn't quite work (maybe I wasn't doing it correctly).
So, fellow experts, what's the easiest and fastest way to switch between two different X11 config files?
View 1 Replies
View Related
Jul 17, 2010
I set up a Ubuntu machine using the OnBoard video, and it runs OK.
Now, I put a nVidia card in it (2009'ish 512mb), and there is no screen after the BIOS screen.
If I boot off a Live CD, everything is fine, so the card is supported.
How do I get Ubuntu to look for the new card on bootup? Do I have to reinstall? If so, will it wipe out the installed applications and data?
Code:
cd / (this gets you to root)
cd etc
sudo chmod 777 X11 (this permits changing names)
cd X11
sudo chmod 777 xorg.conf.failsafe
[Code].....
View 5 Replies
View Related
Jul 20, 2010
Sometimes when Ubuntu starts, it appears a screen with "Scanning disk in progress. It may take some time". But after it reaches 70% it completely stops, so I have to do a hard restart . Can I just switch off this automate? It doesn't help only makes problems. And slows down booting.
View 9 Replies
View Related
Sep 19, 2010
A few months ago I upgraded one of my Ubuntu boxes to 10.04.1 and haven't been able to switch keyboard layouts ever since. I have US and Russian Phonetic keyboards and used to be able to switch between them using the keyboard switching panel applet back when I was using Karmic Koala. Now the applet is gone and not even available in the list of applets.
I understand the applet has been removed in the new Ubuntu. But why? And what other means of switching keyboard layouts are available now?
The trouble is that I have never been able to switch layouts without the applet -- none of the keyboard shortcuts I tried under Preferences > Keyboard > Layouts ever worked in any version of Ubuntu. Now I can't even test the Russian layout inside the Layouts tab, i.e. when I select Russian Phonetic and type something in the test box below I keep getting US layout characters.
View 6 Replies
View Related
Oct 11, 2010
I am trying to disable font smoothing in Firefox 3.6.10 in Ubuntu 10.10. I have disabled font smoothing in System > Preferences > Appearance > Fonts (Rendering = Monochrome) Firefox continues smoothing fonts and some other applications also continue to smooth them. I have tried restarting the system
View 3 Replies
View Related
Oct 14, 2010
My old ATI 4850 graphic card died and since everyone keeps saying that Nvidia is the way to go in Linux I got myself a brand spanking new Gainward GeForce GTX 460 "Golden Sample - Goes Like Hell". Yay! Switching from ATI to Nvidia caused me a lot of problems with drivers and crashes though so I decided to reinstall as I have been upgrading Ubuntu for some time now and I guess it couldn't hurt to start from scratch.
This is what my screen looks like:
I don't mind the purple colours in Ubuntu but this is a bit too much
I can still move the mouse pointer around but I cannot do anything except hard reset.
Everything worked just fine with the ATI card and the new card also works 100 % in Windows 7. So far it seems to work without the driver activated but I really would like it to work.
View 9 Replies
View Related
Oct 26, 2010
How can I disable the virtual desktop switching when my mouse gets close to the edge of the current desktop. I prefer to switch desktops by using the virtual desktop module in the shelf, but I would like to be able drag windows another desktop.
resource website for e17? I'm having trouble finding answers to my questions from the lack of guides provided for e17.
View 5 Replies
View Related
Nov 2, 2010
If I enter my first virtual terminal with ctrl + alt + F1, how would I get back to my GUI.
View 7 Replies
View Related