nixCraft Linux / UNIX / Shell Scripting Forum

nixCraft

Linux / UNIX Tech Support Forum

ipfw firewall invert / except rule

This is a discussion on ipfw firewall invert / except rule within the Networking, Firewalls and Security forums, part of the Mastering Servers category; Hi I want to add a rule with except symbol. e.g. ipfw add 100 fwd 127.0.0.1,8080 tcp from any (except ...


Register free or login to your account to remove all advertisements.

Go Back   nixCraft Linux / UNIX / Shell Scripting Forum > Mastering Servers > Networking, Firewalls and Security

Linux answers from nixCraft.


Networking, Firewalls and Security No it's not a secret. Talk about firewalls and security issues.

Reply

 

Thread Tools Display Modes
  #1 (permalink)  
Old 20th June 2009, 02:59 AM
Senior Member
 
Join Date: Jul 2006
Posts: 158
Thanks: 0
Thanked 2 Times in 2 Posts
Rep Power: 5
asim.mcp is on a distinguished road
Default ipfw firewall invert / except rule

Hi

I want to add a rule with except symbol.

e.g.

ipfw add 100 fwd 127.0.0.1,8080 tcp from any (except 127.0.0.1) to any dst-port 80

What will be the correct rule??
Please help...
Reply With Quote
  #2 (permalink)  
Old 20th June 2009, 04:32 AM
Senior Member
 
Join Date: Jul 2006
Posts: 158
Thanks: 0
Thanked 2 Times in 2 Posts
Rep Power: 5
asim.mcp is on a distinguished road
Smile

Hi.

at last i found the solution. Here is the command

Code:
ipfw add 100 fwd 127.0.0.1,8080 tcp from any to 10.10.10.1 dst-port 80 in recv fxp0

fxp0 is the network card you're redirecting the port 80 traffic on
Reply With Quote
  #3 (permalink)  
Old 20th June 2009, 04:48 AM
nixcraft's Avatar
Never say die
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash, Perl, Python
Posts: 3,300
Thanks: 13
Thanked 413 Times in 306 Posts
Rep Power: 10
nixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond repute
Default

You could have also used skipto. E.g.

Code:
ipfw add 100 skipto 200 ip4 from 1.2.3.4 to any
__________________
Vivek Gite
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Do you run a Linux? Let's face it, you need help!
Cricket & IPL News Blog
Reply With Quote
Reply

Tags
firewall, freebsd firewall, ipfw, ipfw fwd, ipfw skipto


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
OPEN BSD 3.9 Firewall HawaiiMan08 All about FreeBSD/OpenBSD/NetBSD 3 2nd August 2008 01:48 PM
creating firewall ramsatpm Networking, Firewalls and Security 1 28th March 2008 09:15 AM
squid without firewall meenal Networking, Firewalls and Security 1 29th October 2007 03:54 PM
ipfw: getsockopt(IP_FW_GET): Protocol not available raj All about FreeBSD/OpenBSD/NetBSD 1 8th July 2007 01:31 PM
Spamassassin URI rule not working properly diptanjan Mail Servers 2 26th June 2007 11:11 AM


All times are GMT +5.5. The time now is 01:20 PM.


Powered by vBulletin® Version 3.8.6 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40