Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 2nd March 2008, 01:41 PM
Hades0523 Offline
Registered User
 
Join Date: Jan 2008
Posts: 56
how can I write this iptables?

This is an iptables rule on my laptop
Code:
#!/bin/bash
#Filter
iptables -F
iptables -X
iptables -Z
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p TCP -i wlan0 --dport 23 -j ACCEPT
iptables -A INPUT -i wlan0 -j DROP
iptables -A INPUT -p TCP -i tap0 --dport 23 -j ACCEPT
iptables -A INPUT -i tap0 -j DROP

#Nat
iptables -t nat -F
iptables -t nat -X
iptables -t nat -Z
iptables -P POSTROUTING DROP -t nat
iptables -P OUTPUT ACCEPT -t nat
iptables -P PREROUTING ACCEPT -t nat
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o wlan0 -j ACCEPT
As this rules my Desktop and guest system(xp) of vbox on Laptop can telnet to my Laptop.Laptop couldnt get any websites works(include msn .etc) but guest system could.If I make "iptables -A INPUT -i wlan0 -j ACCEPT" intead of "iptables -A INPUT -i wlan0 -j DROP",Laptop`s network can works well.Is there any problems if I use "iptables -A INPUT -i wlan0 -j DROP"?can anybody point it for me?thanks.

Last edited by Hades0523; 2nd March 2008 at 01:47 PM.
Reply With Quote
Reply

Tags
iptables, write

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables-save write to forbidden !!!help!!! desiringyhwh Security and Privacy 5 19th April 2009 10:41 PM
SELinux is preventing iptables-save (iptables_t) "read write" unconfined_t. Thaidog Security and Privacy 11 5th March 2009 10:22 AM
Can't write after giving write permission also!! tataiermail Using Fedora 2 14th September 2008 02:06 PM
command #service iptables save changed the original config of iptables kesavulur Security and Privacy 0 28th November 2007 06:33 AM


Current GMT-time: 16:56 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat