All of lore.kernel.org
 help / color / mirror / Atom feed
* IP forwarding
@ 2005-08-04  1:37 Ricardo J. Méndez
  2005-08-04  4:15 ` Gömöri Zoltán
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Ricardo J. Méndez @ 2005-08-04  1:37 UTC (permalink / raw)
  To: netfilter

Hi,

I've got a network setup where the internal router is a Linux box
running iptables.  External interface is eth0, internal eth1.  I'm
attempting to forward an external IP address (say, 1.2.3.4) to an
internal machine.

The rule I added is:

iptables -t nat -A PREROUTING -d 1.2.3.4 -p tcp --dport 80 -j DNAT
--to 192.168.1.202

However, attempting to 

telnet 1.2.3.4 80

does not work.  It's clear that the rule is being applied, because the
web server running on the external machine is not responding unless I
telnet from the router itself, but unfortunately I'm not getting into
192.168.1.202 either.  Attempting to

telnet 192.168.1.202 80

does work as expected.

What am I missing?  Any pointers are welcome.  Thanks,



Ricardo J. Méndez
http://ricardo.strangevistas.net/


^ permalink raw reply	[flat|nested] 28+ messages in thread
* IP forwarding
@ 2012-01-27  9:59 Prashant Batra (prbatra)
  0 siblings, 0 replies; 28+ messages in thread
From: Prashant Batra (prbatra) @ 2012-01-27  9:59 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA,
	ipsec-tools-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f


[-- Attachment #1.1: Type: text/plain, Size: 1366 bytes --]

Hi,

 

I am trying to establish an IPSec tunnel to protect a subnet behind a
linux machine and a subnet behind some other gateway.

Lefsubnet - 172.17.0.0/16 (behind linux gateway)

Rightsubnet - 172.16.0.0/16

 

>From a host on left subnet, I am trying to ping to a host on right
subnet-

ping 172.16.60.1 -I 172.17.70.87

 

tcpdump capture on linux machine connected to left subnet-

04:27:09.939598 IP 172.17.70.87 > 172.16.60.1: icmp 64: echo request seq
170

 

Tcpdump capture on linux machine connected on right subnet-

04:26:32.941624 IP 1.1.0.1 > 192.168.101.101:
ESP(spi=0x020000c3,seq=0x16d)                 //Outer IPs

04:26:32.943940 IP 192.168.101.101 > 1.1.0.1:
ESP(spi=0x10000102,seq=0x16d)

04:26:32.943940 IP 172.16.60.1 > 172.17.70.87: icmp 64: echo reply seq
133

 

So, it's clear that linux gateway is able to protect the data and send
to the connected gateway (ESP packets to outer IPs).

And the second gateway is responding with ESP packet which is decoded on
linux gateway and sent to the ip stack again by linux kernel (ICMP
reply).

But the reply doesn't reach the host on left subnet.

 

I enabled ip_forwarding through /proc/sys/net/ipv4/ip_forwarding.

 

Please let me know, if I am missing something.

 

Any help would be appreciated.

 

Regards,

Prashant


[-- Attachment #1.2: Type: text/html, Size: 4087 bytes --]

[-- Attachment #2: Type: text/plain, Size: 377 bytes --]

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 28+ messages in thread
* IP  Forwarding
@ 2005-10-21 21:22 Jerry Alexander
  2005-10-22 12:53 ` Henrik Nordstrom
  2005-10-22 13:11 ` Aseem Rastogi
  0 siblings, 2 replies; 28+ messages in thread
From: Jerry Alexander @ 2005-10-21 21:22 UTC (permalink / raw)
  To: netfilter

Dear NF:

          I cannot get IPTABLES FORWARDing to work when the machines are 
directly
connected via a twisted cable.
         Does FORWARDing only work with a router between the machines in 
question?
         If not, how can I get it to work?   I see the packets coming 
into the box(ethereal)
but none going out.
         Can someone give me a quick overview of how, at the kernel code 
level,
how FORWARDing works and how to modify it to get two machines who are 
directly
connected to work.


                                                                                     
Jerry



^ permalink raw reply	[flat|nested] 28+ messages in thread
[parent not found: <20041028172521.3B3CB672@mail.817west.com>]
* Ip Forwarding
@ 2004-10-28 17:23 Joe Wright
  0 siblings, 0 replies; 28+ messages in thread
From: Joe Wright @ 2004-10-28 17:23 UTC (permalink / raw)
  To: netfilter

Hi, I'm new to iptables and am trying to set up a firewall for my hosting
company. We have a block of 128 public ips starting at 207.145.24.128 with a
mask of 255.255.255.192. I have a redhat 9 box set up with 2 nics. My goal
is to have it between the router and my network. It should allow connections
to port 80 for all ips behind it and I would also like to specify certain
ports for certain ips for dns, ftp, remote desktop, etc. I've found tons of
info on using iptables with nat but not much on just blocking ports for ips
passing through it. I'm also not quite sure of how to configure the second
nic that connects to my internal network. Any help would be greatly
appreciated.

 

Joe


^ permalink raw reply	[flat|nested] 28+ messages in thread
* Ip Forwarding
@ 2003-02-21 23:46 William Olbrys
  2003-02-22  0:28 ` Willi Dyck
  0 siblings, 1 reply; 28+ messages in thread
From: William Olbrys @ 2003-02-21 23:46 UTC (permalink / raw)
  To: netfilter

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

Is it possible to just forward the IP addresses? That way my
iptables/gateway box WONT change the ips and JUST act like a firewall?
Using SNAT and DNAT is too complicated with windows.
 
Thanks
Will Olbrys.


 E2-O: The presence of this footer indicates the message has been scanned for viruses by the WebShield e500.

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

^ permalink raw reply	[flat|nested] 28+ messages in thread
* IP forwarding
@ 2002-09-28  4:22 SB CH
  2002-09-28  7:27 ` Antony Stone
  0 siblings, 1 reply; 28+ messages in thread
From: SB CH @ 2002-09-28  4:22 UTC (permalink / raw)
  To: netfilter



Hello, all

I would like to forward one IP to another IP.

for example, 
eth0 IP is 211.1.1.1 and eth0:1 is 211.1.1.2
and I would like to forward all request to 211.1.1.2
toward 61.1.2.3 which is another network or not.
Is it possible?

I did like this to do, but it is not work.

# ifconfig eth0:1 211.1.1.2
# iptables -t nat -A  PREROUTING -d 211.1.1.2 -i eth0 j DNAT --to 61.1.2.3

Any idea?

Thanks in advance.



_________________________________________________________________
보다 빠르고 보기 편한 뉴스. 오늘의 화제는 MSN 뉴스에서 확인하세요. 
http://www.msn.co.kr/news/



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

end of thread, other threads:[~2012-01-27  9:59 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-04  1:37 IP forwarding Ricardo J. Méndez
2005-08-04  4:15 ` Gömöri Zoltán
2005-08-04  5:02   ` curby .
2005-08-04 18:42     ` Ricardo J. Méndez
2005-08-04 21:33       ` curby .
2005-08-04 22:20         ` Ricardo J. Méndez
2005-08-04  7:55   ` Jan Engelhardt
2005-08-04 16:22 ` Patrick Nelson
2005-08-04 18:19   ` Ricardo J. Méndez
2005-08-04 19:54     ` Patrick Nelson
2005-08-04 19:33 ` Jason Opperisano
  -- strict thread matches above, loose matches on Subject: below --
2012-01-27  9:59 Prashant Batra (prbatra)
2005-10-21 21:22 IP Forwarding Jerry Alexander
2005-10-22 12:53 ` Henrik Nordstrom
2005-10-22 13:11 ` Aseem Rastogi
     [not found] <20041028172521.3B3CB672@mail.817west.com>
2004-10-28 18:26 ` Ip Forwarding Jason Opperisano
2004-10-30 10:55   ` Nick Drage
2004-10-30 15:25     ` Jason Opperisano
2004-10-30 17:29       ` Nick Drage
2004-10-28 17:23 Joe Wright
2003-02-21 23:46 William Olbrys
2003-02-22  0:28 ` Willi Dyck
2003-02-22  0:47   ` William Olbrys
2003-02-22 14:57     ` William Olbrys
2003-02-23  3:43       ` Bjorn Ruberg
2003-02-23 21:38         ` Willi Dyck
2002-09-28  4:22 IP forwarding SB CH
2002-09-28  7:27 ` Antony Stone

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.