PDA

View Full Version : firewall settings through iptables


echo
2nd January 2005, 02:10 AM
hey everybody. i've migrated from the linuxquestions.org site and just registered here. i've been browsing the forums and it seems there are quite a few linux users here who know what they are doing. So i have a question. i have a machine that is running FC2 with no X interface, because my monitor just took a crap on me, and i am trying to figure out how to disable, if at all possible, the firewall settings in iptables. i am setting up nfs between this system and another. so far i have made abosulutely no progress with the firewall thing. however everything else seems to be in order with nfs. Any solutions?? any input would be awesome! i'm anxious to learn more so type away!

Brian1
2nd January 2005, 03:43 AM
So what you are saying is you have no monitor attached to this machine?
You have another computer with monitor?
Can you connect that monitor to the other computer?

If not then maybe you can get in through the serial port. Its been a long time since I dealt with serial terminals. Don't even know if FC2 is setup that way. Look into that.

Scan the machine with nmap and see if there are any services you can connect to like ssh telnet rsh. If none are there and you have not set them up then that is out of the question.

Pull the drive out install it in the working computer and mount it. Edit the neccessay files and then put back in. That may have issues with mounts since default fedora/redhat uses labels versus defined /dev points.

Put the drive in a Externel USB Enclosure, mount it, edit it, and reinstall it.


If it was Windows it would be a piece of cake. Too many open holes.
Brian1
" Google the Linux way @ http://www.google.com/linux "

echo
2nd January 2005, 07:34 AM

sorry for the miscommunication. i do infact have a monitor in working order on the machine. the fact is that the monitor is pretty old and for some reason cannot display any correct resolution. i pulled it out from under the stairs, i'm lucky it displays a shell :)
i was curious if i could do any of this soley using the shell. i am trying to learn how to do everything in the shell as it is more efficient. i'll probably have to spend some more time with iptables to really learn how do activate/deactivate the firewall, but i was curious if there was a quick way, bypass all the complicated stuff, and just deactivate the firewall.

Thanks

ghaefb
2nd January 2005, 10:45 AM
You can flush all the iptables rules with this command: iptables -F
The firewall is then "disabled"
Check you rules like this: iptables -L

Brian1
2nd January 2005, 04:09 PM
If you read up on iptables you can edit /etc/sysconfig/iptables and create your own. If you have no iptables running you can install webmin and it has a module to create firewall. Then you can login to it using webmin to make changes. Also you can VNC to it once setup as well from other computer and have a gui display if X is still running on the computer. Some info here, more at linuxquestions.org, and lots out on the net to do many things.

Brian1
" Google the Linux way @ http://www.google.com/linux "

crossfire
2nd January 2005, 05:40 PM
sorry for the miscommunication. i do infact have a monitor in working order on the machine. the fact is that the monitor is pretty old and for some reason cannot display any correct resolution. i pulled it out from under the stairs, i'm lucky it displays a shell :)
i was curious if i could do any of this soley using the shell. i am trying to learn how to do everything in the shell as it is more efficient. i'll probably have to spend some more time with iptables to really learn how do activate/deactivate the firewall, but i was curious if there was a quick way, bypass all the complicated stuff, and just deactivate the firewall.

Thanks

You can disable firewall service with:

#service iptables stop

and edit rules , config with:

#lokkit (text mode)

echo
2nd January 2005, 09:25 PM
thanks for the commands! everything worked great and i can now access and mount my nfs directories.

another thing, what is lokkit? i've never heard of it before. is it a text editor like vim?

crossfire
3rd January 2005, 06:34 PM
thanks for the commands! everything worked great and i can now access and mount my nfs directories.

another thing, what is lokkit? i've never heard of it before. is it a text editor like vim?

Lookit is a config tool that always come with old Redhats, you can set rules and activate/deactivate iptables firewall. Have same firewall options of system-config-securitylevel but in text-mode.