All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: Iptables help
@ 2005-04-04 12:08 Vishwas Manral
  0 siblings, 0 replies; 22+ messages in thread
From: Vishwas Manral @ 2005-04-04 12:08 UTC (permalink / raw)
  To: dpadalkar2001, netfilter-devel

Hi,

I had worked on something similar and could not find any document on
this.

However the rules are stored as "struct ipt_entry" in the kernel. Check
the file ip_tables.c for function do_replace. It should be clearer to
you. 

If it is not let me know.

Thanks,
Vishwas
-----Original Message-----
From: netfilter-devel-bounces@lists.netfilter.org
[mailto:netfilter-devel-bounces@lists.netfilter.org] On Behalf Of
dpadalkar2001
Sent: Monday, April 04, 2005 10:42 AM
To: netfilter-devel@lists.netfilter.org
Subject: Iptables help


hello.
    Currently i'm developing something similar to iptables.I wud like to
know
where does the iptables store the rules and the format in which it
sotres the 
rules. If i can know this , my task to store it in good format becomes a
bit 
easier and more standardised . I shall be very grateful and am very very
helpful
   thanx
Indiatimes Email now powered by APIC Advantage. Help! 
Help

^ permalink raw reply	[flat|nested] 22+ messages in thread
* iptables help
@ 2006-10-31 11:41 Vikram Bhuskute
  0 siblings, 0 replies; 22+ messages in thread
From: Vikram Bhuskute @ 2006-10-31 11:41 UTC (permalink / raw)
  To: netfilter-devel


Hi All,
             I am trying to understand the netfilter/ipatable source
code . 
1. Could somebody suggest godd place/doc/tutorial to start ?
2. I was trying to locate the place where the source IP and  ports are
actually changed ..but couldn't locate ?


Any info on this will be a great help for me.

Regards

Vikram

============================================================================================================================

Tech Mahindra, formerly Mahindra-British Telecom.
 
Disclaimer:

This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.

============================================================================================================================

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Iptables help
@ 2005-04-04  5:11 dpadalkar2001
  2005-04-04 14:46 ` Henrik Nordstrom
  0 siblings, 1 reply; 22+ messages in thread
From: dpadalkar2001 @ 2005-04-04  5:11 UTC (permalink / raw)
  To: netfilter-devel


hello.
    Currently i'm developing something similar to iptables.I wud like to know
where does the iptables store the rules and the format in which it sotres the 
rules. If i can know this , my task to store it in good format becomes a bit 
easier and more standardised . I shall be very grateful and am very very helpful
   thanx
Indiatimes Email now powered by APIC Advantage. Help! 
Help

^ permalink raw reply	[flat|nested] 22+ messages in thread
* IPTABLES HELP
@ 2004-12-15 23:09 Burton
  2004-12-15 23:17 ` Jason Opperisano
  0 siblings, 1 reply; 22+ messages in thread
From: Burton @ 2004-12-15 23:09 UTC (permalink / raw)
  To: netfilter

Ok I have had some great help with people on this board I just have not
found an answer to my problem.
 
This is what I need to happen
 
[Client]--->T1(12.22.81.1) -->[Linux 12.22.81.8 10025]-->[Windows Mail
Server 204.250.113.2 25] 
 
Then I would like it to also send the data back though T1 (12.22.81.1)
 
Current clients get to our SMTP server IE:
[Client]--->T1(204.250.113.1) -->[Windows Mail Server 204.250.113.2 25]
 
 
The point of this is my boss wants us to divert some traffic though t1
(12.22.81.1) but keep the our mail server on its current network
 
This is what I have tried
 
iptables -F
service iptables stop
 
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 10025 -j DNAT --to
204.250.113.2:25
 
iptables -t filter -A FORWARD -i eth0 -d 204.250.113.2 - o eth1 -p tcp
--dport 25 -j ACCEPT
 
service iptables save
 
service iptables start
 
telnet 12.22.81.8 10025
 
I have no other scripts running in my IPTABLES that is why I do the flush
and Ipfowarding is set to 1
 
Any Ideas?

^ permalink raw reply	[flat|nested] 22+ messages in thread
* iptables help
@ 2004-11-04  2:42 Wei Ming Long
  2004-11-05 10:43 ` Harald Welte
  0 siblings, 1 reply; 22+ messages in thread
From: Wei Ming Long @ 2004-11-04  2:42 UTC (permalink / raw)
  To: netfilter-devel, Netfiltermailinglistnetfilter


Hi everone,

I have a setup as shown below:

                   VNC Server 192.168.1.4
                          |
                          | --------> ssh tunnel on port 5800
                          |
                eth1= 192.168.1.2
                          |
                Linux Gateway
                          |
                 eth0=192.168.33.167
                          |
                          |
                 WindowsXP 192.168.33.164 
          

Requirement: To be able to access the VNC Server behind the Linux gateway
using the web browser on port 5800 tunneled through ssh.

I created a ssh tunnel between the VNC Server(192.168.1.4) & the Linux
Gateway(192.168.1.2) for port 5800 and the following iptables command in
Gateway:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to
192.168.1.2:5800 

When I type in http://192.168.33.167 in the browser on the WindowsXP machine,
I was expecting that the http request on port 80 would be redirected to port
5800 & go through the tunnel & reach the VNC Server.

But it doesn't work, what is wrong? can someone please help me with this?


Best regards
Matthew


-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank You.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 22+ messages in thread
* iptables help
@ 2004-11-04  2:40 ` Wei Ming Long
  0 siblings, 0 replies; 22+ messages in thread
From: Wei Ming Long @ 2004-11-04  2:40 UTC (permalink / raw)
  To: netfilter-devel, Netfiltermailinglistnetfilter


Hi everone,

I have a setup as shown below:

                   VNC Server 192.168.1.4
                          |
                          | --------> ssh tunnel on port 5800
                          |
                eth1= 192.168.1.2
                          |
                Linux Gateway
                          |
                 eth0=192.168.33.167
                          |
                          |
                 WindowsXP 192.168.33.164 
          

Requirement: To be able to access the VNC Server behind the Linux gateway
using the web browser on port 5800 tunneled through ssh.

I created a ssh tunnel between the VNC Server(192.168.1.4) & the Linux
Gateway(192.168.1.2) for port 5800 and the following iptables command in
Gateway:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to
192.168.1.2:5800 

When I type in http://192.168.33.167 in the browser on the WindowsXP machine,
Iwas expecting that the http request on port 80 would be redirected to port
5800 & go through the tunnel & reach the VNC Server.

But it doesn't work, what is wrong? can someone please help me with this?


Best regards
Matthew


-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank You.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 22+ messages in thread
* iptables help
@ 2004-11-04  2:40 Wei Ming Long
  0 siblings, 0 replies; 22+ messages in thread
From: Wei Ming Long @ 2004-11-04  2:40 UTC (permalink / raw)
  To: netfilter-devel, Netfiltermailinglistnetfilter


Hi everone,

I have a setup as shown below:

                   VNC Server 192.168.1.4
                          |
                          | --------> ssh tunnel on port 5800
                          |
                eth1= 192.168.1.2
                          |
                Linux Gateway
                          |
                 eth0=192.168.33.167
                          |
                          |
                 WindowsXP 192.168.33.164 
          

Requirement: To be able to access the VNC Server behind the Linux gateway
using the web browser on port 5800 tunneled through ssh.

I created a ssh tunnel between the VNC Server(192.168.1.4) & the Linux
Gateway(192.168.1.2) for port 5800 and the following iptables command in
Gateway:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to
192.168.1.2:5800 

When I type in http://192.168.33.167 in the browser on the WindowsXP machine,
Iwas expecting that the http request on port 80 would be redirected to port
5800 & go through the tunnel & reach the VNC Server.

But it doesn't work, what is wrong? can someone please help me with this?


Best regards
Matthew


-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank You.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 22+ messages in thread
* iptables help
@ 2004-07-28 23:20 Ashley M. Kirchner
  2004-07-29  6:32 ` Antony Stone
  0 siblings, 1 reply; 22+ messages in thread
From: Ashley M. Kirchner @ 2004-07-28 23:20 UTC (permalink / raw)
  To: netfilter


    I need some help adding a few blocking rules (*) to an iptables 
script that I once inherited, and grown over time.  I don't want to post 
the whole thing here because I don't need to be spamming everyone with 
it, but if there's a kind soul willing to help, I'll gladly send it 
(unless no one objects to getting the whole file.)

    (*) the basic gist is that I need to block places like hotmail.com, 
yahoo.com, and other sites from getting accessed from only two machines 
on our private network, during a specific period of time.  If we like 
the way it works, we'll add more machines/IPs to it later.




^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: iptables Help
@ 2004-05-31 16:20 Daniel Chemko
  0 siblings, 0 replies; 22+ messages in thread
From: Daniel Chemko @ 2004-05-31 16:20 UTC (permalink / raw)
  To: vinay, netfilter

Vinay, this isn't a simple problem that can be applied to a standardf
template. To get some info on balancing and sculpting lines, see
http://lartc.org or http://linux-ip.net/html/linux-ip.html 

They have enough reference material to get you through the process.

You also have to note something else. If the two ISP line aren't from
the same ISP, there's no guarantee this'll work at all. The problem is
that each set of IP addresses tied to your PC are pointed to by your
ISP. If your ISP finds you sending sources packets from a network that
isn't theirs, they have all the right in the world to block those
packets. Both Sender/Receiver have to have the same address to make
connections.

Good luck.


^ permalink raw reply	[flat|nested] 22+ messages in thread
* iptables Help
@ 2004-05-31 10:36 Vinay Poojary
  0 siblings, 0 replies; 22+ messages in thread
From: Vinay Poojary @ 2004-05-31 10:36 UTC (permalink / raw)
  To: netfilter

Dear Sir,

  I have installed redhat 9.0 for my server, i have two Internet links. I
have 3 Interface cards attached to my server where the two Internet
links terminate and One Internet card for my local network.

suppose

eth0 - 10.0.0.200 (Local Lan IP address)
eth1 - 11.0.0.254  (The first Isp Link terminate let it be of tata )
eth2 - 12.0.0.254  (The second isp Link terminate Let it be of sify)

 My default gateway is Isp 1 (eth1) But the problem with these is that
they charge a lot .

 So what i want is to upload from eth1 (first Internet Link) and download
from eth2 (second Internet link).

 Please send me any iptable rule which could do this.

Thanks In advance,

Waiting for your reply,

Regards,
vinay


^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: iptables help..
@ 2003-10-13  3:04 George Vieira
  0 siblings, 0 replies; 22+ messages in thread
From: George Vieira @ 2003-10-13  3:04 UTC (permalink / raw)
  To: jerome, Ralf Spenneberg; +Cc: Netfilter

> > FORWARD -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
You have it accepting packets before it gets LOGged.. Put the LOG line above all others..
> > -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
> > -A FORWARD -p tcp -j LOG --log-prefix "FORWARD packets:"

Also, if your DNATing to a local webserver on the same network, it won't work without a SNAT as per jeromes suggestion as you have to make it look like the firewall is MAQUERADing your lan to an outside address BUT it's really inside, so your webserver will see all packets as the firewall and not local hosts...

Thanks,
____________________________________________
George Vieira
Systems Manager
georgev@citadelcomputer.com.au

Citadel Computer Systems Pty Ltd
http://www.citadelcomputer.com.au

Phone   : +61 2 9955 2644
HelpDesk: +61 2 9955 2698
 

> -----Original Message-----
> From: JM [mailto:jerome@gmanmi.tv]
> Sent: Monday, 13 October 2003 1:12 PM
> To: Ralf Spenneberg
> Cc: Netfilter
> Subject: Re: iptables help..
> 
> 
> hi,
> 
> i added LOGging on server_A
> 
> log all INPUT and FORWARD to messages log file... and for 
> some reason nothing 
> is comming up...
> 
> [ having nightmares on this.. : (  ]
> 
> TIA
> 
> 


^ permalink raw reply	[flat|nested] 22+ messages in thread
* iptables help..
@ 2003-10-10  4:45 JM
  2003-10-10  5:29 ` Ralf Spenneberg
  0 siblings, 1 reply; 22+ messages in thread
From: JM @ 2003-10-10  4:45 UTC (permalink / raw)
  To: netfilter

network looks like this...


                                                           LAN 
                                                              |
                                                              |
                                                        Firewall
                                                               |
                                                               |
remote server ( A, B, C ) ---- router2 ----- router1 ----- route3 --- remote server (1, 2, 3 etc ) --- internet
                      |
 Datacenter     |
     (network)    |
          remote server (x,y,z)
                    |
                    |
                 internet

i want to access the http server on "remote server x" from LAN.. without going through the internet..
so what i did is setup DNAT on "remote server A" but somehow its not working.. 

this is my ruleset..

NAT
-A PREROUTING -d serverA_IP -p tcp -m tcp --sport 1024:65535 --dport 81 -j DNAT --to-destination serverx_IP:80

FILTER
-A INPUT -p tcp -s LAN_IP/24 --sport 1024:65535 -d serverA_IP --dport 81 -j LOG --log-prefix "INPUT packets:"
-A FORWARD -d  serverx_IP -p tcp -m tcp --sport 1024:65535 --dport 80 -m state --state NEW -j ACCEPT
-A FORWARD -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -p tcp -j LOG --log-prefix "FORWARD packets:"


TIA
jm


^ permalink raw reply	[flat|nested] 22+ messages in thread
* iptables help
@ 2003-02-17  6:15 Laxman Gummadavally
  0 siblings, 0 replies; 22+ messages in thread
From: Laxman Gummadavally @ 2003-02-17  6:15 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/plain, Size: 675 bytes --]

Hi ,

I have installed RedHat linux 7.3.. 
Iptables version :    Iptables-1.2.5-3 


When I issue the following comand I am getting error like
[root@fire laxman]# modprobe iptable_nat
/lib/modules/2.4.18-3/kernel/net/ipv4/netfilter/ip_tables.o: init_module: Device or resource busy
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters
/lib/modules/2.4.18-3/kernel/net/ipv4/netfilter/ip_tables.o: insmod /lib/modules/2.4.18-3/kernel/net/ipv4/netfilter/ip_tables.o failed
/lib/modules/2.4.18-3/kernel/net/ipv4/netfilter/ip_tables.o: insmod iptable_nat failed
[root@fire laxman]# 


Please Help me....
Laxman

[-- Attachment #2: Type: text/html, Size: 1400 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2006-10-31 11:41 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-04 12:08 Iptables help Vishwas Manral
  -- strict thread matches above, loose matches on Subject: below --
2006-10-31 11:41 iptables help Vikram Bhuskute
2005-04-04  5:11 Iptables help dpadalkar2001
2005-04-04 14:46 ` Henrik Nordstrom
2004-12-15 23:09 IPTABLES HELP Burton
2004-12-15 23:17 ` Jason Opperisano
2004-11-04  2:42 iptables help Wei Ming Long
2004-11-05 10:43 ` Harald Welte
2004-11-04  2:40 Wei Ming Long
2004-11-04  2:40 ` Wei Ming Long
2004-11-04 21:02 ` Jason Opperisano
2004-11-04 22:39 ` Bosse Klykken
2004-11-04  2:40 Wei Ming Long
2004-07-28 23:20 Ashley M. Kirchner
2004-07-29  6:32 ` Antony Stone
2004-05-31 16:20 iptables Help Daniel Chemko
2004-05-31 10:36 Vinay Poojary
2003-10-13  3:04 iptables help George Vieira
2003-10-10  4:45 JM
2003-10-10  5:29 ` Ralf Spenneberg
2003-10-13  3:12   ` JM
2003-02-17  6:15 Laxman Gummadavally

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.