Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-16-2004, 08:38 AM
|
#1
|
Member
Registered: Jun 2003
Location: Florida, USA
Distribution: Drake 10.1 Download
Posts: 182
Rep:
|
What's wrong with this iptables syntax??
Hi all!
My firewall's working fine, except it seems that packets originating on the firewalled-server itself are not being forwarded. So if packets arrive AT the server going to A, they get properly sent to B, but if packets originating ON the server go to A, they don't get sent anywhere. I'm using iptables v 1.2.9 on SUSE 9.1 Pro. As far as I can tell from the man pages, this command below is valid, but I always get an "invalid argument" when I execute it:
Code:
iptables -t nat -A OUTPUT -d 1.2.3.4 -j DNAT --to-destination 192.168.0.5
Any ideas what's wrong with the above? The only other rules for OUTPUT are:
Code:
iptables -P OUTPUT ACCEPT
iptables -F OUTPUT
|
|
|
06-16-2004, 02:53 PM
|
#2
|
Member
Registered: Mar 2003
Location: Belgium
Distribution: Hardened gentoo
Posts: 323
Rep:
|
Could you send the exact error message?
This command should normally execute successfully...
|
|
|
06-16-2004, 03:12 PM
|
#3
|
Member
Registered: Apr 2001
Location: Bremen, Germany
Distribution: Debian
Posts: 303
Rep:
|
The syntax is correct. However, for this command to work you need to set the parameter CONFIG_IP_NF_NAT_LOCAL during kernel configuration.
I think some distribution kernels don't include this options in their pre-compiled kernels since NAT'ing locally generated connections is a somewhat unusual thing to do: After all when the connection is generated on the local machine why not make it a connection with the "right" destitination in the first place?
|
|
|
06-16-2004, 03:54 PM
|
#4
|
Member
Registered: Jun 2003
Location: Florida, USA
Distribution: Drake 10.1 Download
Posts: 182
Original Poster
Rep:
|
Thanks! That explains it. What was happening is, I have a DNS on A and a web server on B. To enable everyone to access B (internal and external folks), the DNS gives a global ip address, then uses a firewall to route the packets to B. Thus, if a user is ON A and surfs to the web server, DNS gives it a global ip address, and the packets weren't routing since the packets were originated from A. However I've since changed this so my DNS serves-up different addresses based on who's asking (using the "view" tag). So you're right, now that I made my DNS better, there's no need for this rule.  But I appreciate the help!
|
|
|
All times are GMT -5. The time now is 08:08 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|