All of lore.kernel.org
 help / color / mirror / Atom feed
* nat problem...
@ 2002-11-15 20:45 Rahul Jadhav
  0 siblings, 0 replies; 27+ messages in thread
From: Rahul Jadhav @ 2002-11-15 20:45 UTC (permalink / raw)
  To: netfilter

I have a setup without a dmz, ie, the servers (http, mail, ssh) share the same subnet as my intranet clients (dhcp). The iptables script I am struggling with allows clients to browse the net but refuses them connections to the servers. Somehow the firewall refuses tcp/udp connections meant for the servers. The firewall machine runs no public services (forwards traffic only).
the forward and nat rules that i use are 

public_ip=external web ip
intra_dev=internal iface
extra_dev=external iface
intra_ip=internal ip
extra_ip=external ip
http=http server ip
mail=mail server ip

# forward
$iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
# do I need these 2 lines
$iptables -A FORWARD -p tcp -i $intra_dev -o $extra_dev -j ACCEPT
$iptables -A FORWARD -p udp -i $intra_dev -o $extra_dev -j ACCEPT

$iptables -A FORWARD -p tcp -i $extra_dev -m state --state NEW,ESTABLISHED,RELATED --dport 80 -j ACCEPT
$iptables -A FORWARD -p tcp -i $extra_dev -m state --state NEW,ESTABLISHED,RELATED --dport 81 -j ACCEPT

$iptables -A FORWARD -p tcp -i $extra_dev -o $intra_dev --dport 80 -d $http -j ACCEPT
$iptables -A FORWARD -p tcp -i $extra_dev -o $intra_dev --dport 81 -d $mail -j ACCEPT

# prerouting
$iptables -A PREROUTING -t nat -p tcp -i $extra_dev -d $public_ip --dport 80 -j DNAT --to $http
$iptables -A PREROUTING -t nat -p tcp -i $extra_dev -d $public_ip --dport 81 -j DNAT --to $mail

# postrouting
# either these 2 rules or the masquerade rule works

$iptables -A POSTROUTING -t nat -p tcp -o $extra_dev -s $intra_lan -d $universe -j SNAT --to $extra_ip
$iptables -A POSTROUTING -t nat -p tcp -o $extra_dev -s $intra_lan -d $universe -j SNAT --to $extra_ip

$iptables -A POSTROUTING -t nat -o $extra_dev -j MASQUERADE

does someone see a problem that I can't. Also, could someone enlighten me about the output chain and whether or not I need it here.
Thanks

Rahul




^ permalink raw reply	[flat|nested] 27+ messages in thread
* nat problem
@ 2004-07-13 20:40 Frans Luteijn
  2004-07-13 21:06 ` Antony Stone
  0 siblings, 1 reply; 27+ messages in thread
From: Frans Luteijn @ 2004-07-13 20:40 UTC (permalink / raw)
  To: netfilter

Dear sirs, madams,

I have a little problem, which might be a bug. I have an 3COM
ISDN-router. It broadcasts every 10 seconds its connectionstatus to the
internal net. Now I want to forward those broadcasts to another network.

This is the situation:


+------+    +--------+    +--------+
|ISDN- |    |        |    |Internal|
|router|----|firewall|----|network |
+------+    |        |    +--------+
            +--------+
                |
                |
                |
            +------+
            |ADSL- |
            |router|
            +------+


The ISDN-router has 192.168.1.1/24, the ADSL-router has 172.19.3.1/16,
the firewall has at eth0 192.168.1.4, at eth1 172.19.3.2 and at eth2
192.168.2.1. The internal network is 192.168.2.0/24.

The firewall is a Debian-Linux with a 2.4.26 kernel with Nat enabled.

After reading of all the nesesary HOWTO's, I decided that that
forwarding should be done with prerouting. To know what I have to
forward, I have to know what the packets are. I turned logging on for
that interface, and if I can log the packets, I can also manipulate
them.
So I typed:

iptables -t nat -A PREROUTING -i eth0 -j LOG

and waited for the packets to come by. But nothing happened. Althought I

could see some other packets coming in. From my log:

Jul  2 16:38:16 firewall kernel: IN=eth0 OUT=
MAC=ff:ff:ff:ff:ff:ff:00:50:04:0e:d9:00:08:00 SRC=192.168.1.3
DST=192.168.1.255 LEN=240 TOS=0x00 PREC=0x00 TTL=32 ID=19499 PROTO=UDP
SPT=138 DPT=138 LEN=220
Jul  2 16:43:40 firewall kernel: IN=eth0 OUT=
MAC=ff:ff:ff:ff:ff:ff:00:50:04:0e:d9:00:08:00 SRC=192.168.1.3
DST=192.168.1.255 LEN=240 TOS=0x00 PREC=0x00 TTL=32 ID=19755 PROTO=UDP
SPT=138 DPT=138 LEN=220

Those are from a machine that will be moved to my internal network

Then I typed:

iptables -A INPUT -i eth0 -j LOG

and there were the packets:

Jul  2 16:47:43 firewall kernel: IN=eth0 OUT=
MAC=ff:ff:ff:ff:ff:ff:08:00:4e:a6:f5:74:08:00 SRC=192.168.1.1
DST=192.168.1.255 LEN=116 TOS=0x00 PREC=0x00 TTL=64 ID=48404 PROTO=UDP
SPT=1025 DPT=2071 LEN=96
Jul  2 16:47:53 firewall kernel: IN=eth0 OUT=
MAC=ff:ff:ff:ff:ff:ff:08:00:4e:a6:f5:74:08:00 SRC=192.168.1.1
DST=192.168.1.255 LEN=116 TOS=0x00 PREC=0x00 TTL=64 ID=48405 PROTO=UDP
SPT=1025 DPT=2071 LEN=96
Jul  2 16:48:03 firewall kernel: IN=eth0 OUT=
MAC=ff:ff:ff:ff:ff:ff:08:00:4e:a6:f5:74:08:00 SRC=192.168.1.1
DST=192.168.1.255 LEN=116 TOS=0x00 PREC=0x00 TTL=64 ID=48406 PROTO=UDP
SPT=1025 DPT=2071 LEN=96

In /proc/net/ip_conntrack I can see:

udp      17 27 src=192.168.1.3 dst=192.168.1.255 sport=138 dport=138
[UNREPLIED] src=192.168.1.255 dst=192.168.1.3 sport=138 dport=138 use=1
udp      17 20 src=192.168.1.1 dst=192.168.1.255 sport=1025 dport=2071
[UNREPLIED] src=192.168.1.255 dst=192.168.1.1 sport=2071 dport=1025
use=1
.......


Now are my questions:
am I doing something wrong, e.g. shouldn't it be prerouting;
can't it be done, because of the sourceport and the destport are
different;
is it a bug in the nat-software or is it intended to work that way?

If you need some extra information, I am happily to provide it.

Yours Sincerely,
--
Frans Luteijn
PGP PblKey fprnt=C4 87 CE AF BC B6 98 C1  EF 42 A1 9A E2 C0 42 5B





^ permalink raw reply	[flat|nested] 27+ messages in thread
* nat problem
@ 2004-07-05 16:33 Frans Luteijn
  2004-07-07 13:07 ` Antony Stone
  0 siblings, 1 reply; 27+ messages in thread
From: Frans Luteijn @ 2004-07-05 16:33 UTC (permalink / raw)
  To: netfilter

Dear Sirs,

I have a little problem, which might be a bug. I have an 3COM
ISDN-router. It broadcasts every 10 seconds its connectionstatus to the
internal net. Now I want to forward those broadcasts to another network.
This is the situation:


+------+    +--------+    +--------+
|ISDN- |    |        |    |Internal|
|router|----|firewall|----|network |
+------+    |        |    +--------+
            +--------+
                |
                |
                |
            +------+
            |ADSL- |
            |router|
            +------+


The ISDN-router has 192.168.1.1/24, the ADSL-router has 172.19.3.1/16,
the firewall has at eth0 192.168.1.4, at eth1 172.19.3.2 and at eth2
192.168.2.1. The internal network is 192.168.2.0/24.

The firewall is a Debian-Linux with a 2.4.26 kernel with Nat enabled.

After reading of all the nesesary HOWTO's, I decided that that
forwarding should be done with prerouting. To know what I have to
forward, I have to know what the packets are. I turned logging on for
that interface, and if I can log the packets, I can also manipulate
them.
So I typed:

iptables -t nat -A PREROUTING -i eth0 -j LOG

and waited for the packets to come by. But nothing happened. Althought I
could see some other packets coming in. From my log:

Jul  2 16:38:16 firewall kernel: IN=eth0 OUT=
MAC=ff:ff:ff:ff:ff:ff:00:50:04:0e:d9:00:08:00 SRC=192.168.1.3
DST=192.168.1.255 LEN=240 TOS=0x00 PREC=0x00 TTL=32 ID=19499 PROTO=UDP
SPT=138 DPT=138 LEN=220
Jul  2 16:43:40 firewall kernel: IN=eth0 OUT=
MAC=ff:ff:ff:ff:ff:ff:00:50:04:0e:d9:00:08:00 SRC=192.168.1.3
DST=192.168.1.255 LEN=240 TOS=0x00 PREC=0x00 TTL=32 ID=19755 PROTO=UDP
SPT=138 DPT=138 LEN=220

Those are from a machine that will be moved to my internal network

Then I typed:

iptables -A INPUT -i eth0 -j LOG

and there were the packets:

Jul  2 16:47:43 firewall kernel: IN=eth0 OUT=
MAC=ff:ff:ff:ff:ff:ff:08:00:4e:a6:f5:74:08:00 SRC=192.168.1.1
DST=192.168.1.255 LEN=116 TOS=0x00 PREC=0x00 TTL=64 ID=48404 PROTO=UDP
SPT=1025 DPT=2071 LEN=96
Jul  2 16:47:53 firewall kernel: IN=eth0 OUT=
MAC=ff:ff:ff:ff:ff:ff:08:00:4e:a6:f5:74:08:00 SRC=192.168.1.1
DST=192.168.1.255 LEN=116 TOS=0x00 PREC=0x00 TTL=64 ID=48405 PROTO=UDP
SPT=1025 DPT=2071 LEN=96
Jul  2 16:48:03 firewall kernel: IN=eth0 OUT=
MAC=ff:ff:ff:ff:ff:ff:08:00:4e:a6:f5:74:08:00 SRC=192.168.1.1
DST=192.168.1.255 LEN=116 TOS=0x00 PREC=0x00 TTL=64 ID=48406 PROTO=UDP
SPT=1025 DPT=2071 LEN=96

In /proc/net/ip_conntrack I can see:

udp      17 27 src=192.168.1.3 dst=192.168.1.255 sport=138 dport=138
[UNREPLIED] src=192.168.1.255 dst=192.168.1.3 sport=138 dport=138 use=1
udp      17 20 src=192.168.1.1 dst=192.168.1.255 sport=1025 dport=2071
[UNREPLIED] src=192.168.1.255 dst=192.168.1.1 sport=2071 dport=1025
use=1
.......


Now are my questions:
am I doing something wrong, e.g. shouldn't it be prerouting;
can't it be done, because of the sourceport and the destport are
different;
is it a bug in the nat-software or is it intended to work that way?

If you need some extra information, I am happily to provide it.

Yours Sincerely,
--
Frans Luteijn
PGP PblKey fprnt=C4 87 CE AF BC B6 98 C1  EF 42 A1 9A E2 C0 42 5B





^ permalink raw reply	[flat|nested] 27+ messages in thread
* NAT problem
@ 2003-10-06 12:30 Jose Pascual
  2003-10-06 13:19 ` Venkatesh. K
  2003-10-06 20:38 ` Joel Newkirk
  0 siblings, 2 replies; 27+ messages in thread
From: Jose Pascual @ 2003-10-06 12:30 UTC (permalink / raw)
  To: netfilter

Hi all,
I am new using iptables and surelly  this wil be an easy and stupid question
but perhaps you can help me. I want to understand NAT so I am trying to do
the following:

I have three computers in my LAN (192.168.1.1; 192.168.1.2 and 192.168.1.3).
192.168.1.1 has a web server and I would like to access it through
192.168.1.2 with NAT. For example openning my browser in 192.168.1.3 and
connecting to 192.168.1.2   I  should see the same as if I connected to
192.168.1.1 web server directly, so I have done the following in
192.168.1.2:

 iptables -t nat -A PREROUTING -p tcp --dport 80 -j
DNAT --to-destination 192.168.1.1


 iptables -t nat -A POSTROUTING -p tcp --sport 80 -j SNAT
--to-source 192.168.1.2

However it doesn't work. Anyone can help me?

Thanks

Regards
Jose Pascual





^ permalink raw reply	[flat|nested] 27+ messages in thread
* RE: nat problem...
@ 2002-11-22 22:52 Yogini Parkhi
  0 siblings, 0 replies; 27+ messages in thread
From: Yogini Parkhi @ 2002-11-22 22:52 UTC (permalink / raw)
  To: Rahul Jadhav, netfilter

Hi Rahul,
Couple of tips that might help you...
1: 
Use "iptables -L -v -n"
Look at the packet and byte counters in there and see which ones of your accept rules actually are accepting packets.

2:
Also a log rule at the end of your FORWARD chain might help identify what kinds of packets are getting dropped.  The log rule will look something like
$iptables -A FORWARD -m limit -j LOG -log-prefix "RAHULS_LOG"
This will log packets to your syslog "/var/log/messages" usually. You can observ those and debug further.

I suspect your syn packets are getting dropped. 
Add the following rule right before: "$iptables -A FORWARD -p tcp -i $extra_dev -m state --state NEW,ESTABLISHED,RELATED --dport 80 -j ACCEPT" This rule you have.

$iptables -A FORWARD -p tcp -i $extra_dev --syn --dport 80 -j ACCEPT

Hopefully this rule will solve your immediate issue. Then the packet and byte counters will point out the unnecessary rules to you and you can remove those.

Hope this helps,
-Yogini




-----Original Message-----
From: Rahul Jadhav [mailto:rahul@iatp.org]
Sent: Friday, November 15, 2002 12:45 PM
To: netfilter@lists.netfilter.org
Subject: nat problem...

I have a setup without a dmz, ie, the servers (http, mail, ssh) share the same subnet as my intranet clients (dhcp). The iptables script I am struggling with allows clients to browse the net but refuses them connections to the servers. Somehow the firewall refuses tcp/udp connections meant for the servers. The firewall machine runs no public services (forwards traffic only).
the forward and nat rules that i use are

public_ip=external web ip
intra_dev=internal iface
extra_dev=external iface
intra_ip=internal ip
extra_ip=external ip
http=http server ip
mail=mail server ip

# forward
$iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
# do I need these 2 lines
$iptables -A FORWARD -p tcp -i $intra_dev -o $extra_dev -j ACCEPT
$iptables -A FORWARD -p udp -i $intra_dev -o $extra_dev -j ACCEPT

$iptables -A FORWARD -p tcp -i $extra_dev -m state --state NEW,ESTABLISHED,RELATED --dport 80 -j ACCEPT
$iptables -A FORWARD -p tcp -i $extra_dev -m state --state NEW,ESTABLISHED,RELATED --dport 81 -j ACCEPT

$iptables -A FORWARD -p tcp -i $extra_dev -o $intra_dev --dport 80 -d $http -j ACCEPT
$iptables -A FORWARD -p tcp -i $extra_dev -o $intra_dev --dport 81 -d $mail -j ACCEPT

# prerouting
$iptables -A PREROUTING -t nat -p tcp -i $extra_dev -d $public_ip --dport 80 -j DNAT --to $http
$iptables -A PREROUTING -t nat -p tcp -i $extra_dev -d $public_ip --dport 81 -j DNAT --to $mail

# postrouting
# either these 2 rules or the masquerade rule works

$iptables -A POSTROUTING -t nat -p tcp -o $extra_dev -s $intra_lan -d $universe -j SNAT --to $extra_ip
$iptables -A POSTROUTING -t nat -p tcp -o $extra_dev -s $intra_lan -d $universe -j SNAT --to $extra_ip

$iptables -A POSTROUTING -t nat -o $extra_dev -j MASQUERADE

does someone see a problem that I can't. Also, could someone enlighten me about the output chain and whether or not I need it here.
Thanks

Rahul




^ permalink raw reply	[flat|nested] 27+ messages in thread
* NAT problem
@ 2002-10-21 13:04 saravanan sakthi
  2002-10-21 15:15 ` Antony Stone
  0 siblings, 1 reply; 27+ messages in thread
From: saravanan sakthi @ 2002-10-21 13:04 UTC (permalink / raw)
  To: nf

  Here is my sinario...
        |             
     ___v__________________
    | eth0: 192.168.1.3/24 |
    |                      |
    |     Linux Box        |
    |                      |
    | eth1: 10.1.1.1/16    |
    `---|------------------'
        |
    ____v________________________________________
   /                                             \
  |   10.1.0.0 network                            \
  |                                                \
  |       ____________         __________           |
  |      /            \       /           \         |
  |     | 10.1.11.0/16 |     | 10.1.9.0/16 |        |
  |     |   network    |     |   network   |        |
  |      \____________/       \___________/         |
  |                                                 |
  |       _____________________________             |
  |      /                             \            |
  |     | 10.1.12.0 (My Network)        \           |
  |     |         |                      \          |
  |     |         |                       \         |
  |     |      ___v________________        |        |
  |     |     | eth0: 10.1.12.1/16 |       |       /
  |     |     |                    |       |      /
  |     |     |    Linux Box       |       |     /
  |     |     |                    |      /     /
  |     |     | eth1: 10.0.0.1/8   |     /     /
  |     |     `---|----------------'    /     /
  |     |         |                    /     /
  |     |        _v________           /     /
  |     |       /          \         /     /
  |     |      | 10.0.0.0/8 |       /     /
  |     |      | network    |      /     /
  |      \      \__________/      /     /
   \      \                      /     /
    \      \____________________/     /
     \                               /
      \_____________________________/

Here

  * The Linux box at the beginning acts as a gateway
and DNS forwarder
    for the entire network (installed with
rc.firewall-2.4).

  * My network is 10.1.12.0, I have implemented my
Linux box as a
    router for my network (installed with
rc.firewall-2.4).also acts
    as DNS forwarder (forwards requests to 10.1.1.1).

  * I have a subnet inside (10.0.0.0).my Linux box
acts as a gateway
    for these computers.

What I want is.....

   Connect a computer from 10.0.0.0 network to connect
computers at
   10.1.0.0 network.

Please tell me what are the rules should be added to
rc.firewall-2.4
file to accomplish this.

Thanks for time

Regards,

Saravanan.V

__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/


^ permalink raw reply	[flat|nested] 27+ messages in thread
* NAT Problem
@ 2002-10-20 23:20 Morgan
  0 siblings, 0 replies; 27+ messages in thread
From: Morgan @ 2002-10-20 23:20 UTC (permalink / raw)
  To: netfilter

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

Hello.
 
I have a question about NAT.
 
I have a client and three servers.
 
One server which I do a remote connect to, and two application servers.
 
Client IP =                            1.2.3.4
Remote con server IP =          1.2.3.5
App Server 1 IP =                  1.2.3.6
App Server 2 IP =                  1.2.3.7
 
I have the following problem.
When I have connected to the Remote con Server I need to be able to
access App Server 1 port 5555 by entering the name of App Server 2 port
5555. (Why is long story)
 
So if I access Remote Con Server and give the command: AppName
AppServer2 -p 5555 I should really access AppServer1 -p 5555
 
 
I figure this can be done with some NATing.
 
Anyone who have any suggestions?
 
 
 
Thanks
Morgan
 

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

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Nat PROBLEM
@ 2002-06-24 11:11 lcef
  2002-06-24 13:34 ` Antony Stone
  0 siblings, 1 reply; 27+ messages in thread
From: lcef @ 2002-06-24 11:11 UTC (permalink / raw)
  To: netfilter

Hello netfilter,

  Hello:
  I have a problem with IP translation.
  I have 2 machines, with DSL conection.
  First machine have eth0 (213.23.xxx.xxx) and second machine with a
  second ethernet named eth1(192.168.2.1).
  I have a webcam in the second machine(192.168.1.21 eth1)and i want
  who any people go to first machine (213.23.xxx.xxx)can look the
  webcam who are installed in de second machine 192.168.2.1:8080.
  In others words when you type http://213.23.xxx.xxx:8080  go to
  192.168.2.1:8080.
  What rules need i to put with IPFILTER?
  Can you help me please.
  Thanks for your time

-- 
Best regards,
 lcef                          mailto:lcef@eb3cef.net




^ permalink raw reply	[flat|nested] 27+ messages in thread
* Completely NAT an ISP: A practical possibility?
@ 2002-06-15 22:14 Brian Capouch
  2002-06-15 22:33 ` Antony Stone
  0 siblings, 1 reply; 27+ messages in thread
From: Brian Capouch @ 2002-06-15 22:14 UTC (permalink / raw)
  To: netfilter

I tried to capture the whole message there in the subject :-)

I wonder if the sages on this list might share advice as to whether or 
not it might be practical to maintain a working ISP where ALL client 
machines use private IP addresses, which are then NAT-ted to public IP 
space as necessary by iptables.

I am getting ready to deploy a small ISP, and this is a very attractive 
idea, but when soliciting ideas from various in-the-know folks I have 
consulted opinions seem to vary very widely.

The biggest drawback that has been voiced so far is that many 
peer-to-peer apps would break, but I'm not so sure right now that is bad 
thing.

All advice gratefully considered.

Thanks.

B.



^ permalink raw reply	[flat|nested] 27+ messages in thread
* NAT problem
@ 2002-05-09  4:41 Tyler Kemp
  2002-06-13 16:03 ` Antony Stone
  0 siblings, 1 reply; 27+ messages in thread
From: Tyler Kemp @ 2002-05-09  4:41 UTC (permalink / raw)
  To: netfilter

Hey,
	I recently installed linux on a spare box I had, in order to share my DSL
connection throughout the house. I've run into a problem with iptables.

Linux distro: Debian Woody
Kernel: 2.4.17
iptables version: 1.2.6a

	Iptables modules are loaded completely, local LAN is setup correctly, and
the windows machine I've been testing the connection with is configured to
use the linux box as it's gateway (no firewall on the windows machine).

Rules I'm using:
#!/bin/sh
#
#   Firewall
#


echo "Setting up Netfilter Firewall"
#flush
iptables -F
iptables -t nat -F

#allow anything already established
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

#allow anything new from LAN
iptables -A INPUT -m state --state NEW -i ! ppp0 -j ACCEPT

#drop mySQL
iptables -A INPUT -p tcp --dport 3306 -j REJECT --reject-with tcp-reset

#open ident
#iptables -A INPUT -p tcp --dport 113 -j ACCEPT

#open httpd
#iptables -A INPUT -p tcp --dport 80 -m limit --limit 2/s -j
LOG --log-prefix "Apache "
#iptables -A INPUT -p tcp --dport 80 -j ACCEPT

#open ssh
#iptables -A INPUT -p tcp --dport 22 -m limit --limit 2/s -j
LOG --log-prefix "SSH "
#iptables -A INPUT -p tcp --dport 22 -j ACCEPT

#allow identd
#iptables -A INPUT -p tcp --dport 53 -j ACCEPT

#log specific curious ports before accepting/denying them
iptables -A INPUT -i ppp0 -p tcp --dport 31337 -m limit --limit 2/s -j
LOG --log-prefix "Trojan "
iptables -A INPUT -i ppp0 -p tcp --dport 27374 -m limit --limit 2/s -j
LOG --log-prefix "Trojan "
iptables -A INPUT -i ppp0 -p tcp --dport 12345 -m limit --limit 2/s -j
LOG --log-prefix "Trojan "

#iptables -A INPUT -i ppp0 -p tcp --dport 6666:7000 -m limit --limit 2/s -j
LOG --log-prefix "IRC "
iptables -A INPUT -i ppp0 -p tcp --dport 6346 -m limit --limit 2/s -j
LOG --log-prefix "6346 DoS "

#allow anything out of service range for tcp/udp (ports over 1024)
iptables -A INPUT -p tcp --dport 1024: -j ACCEPT
iptables -A INPUT -p udp --dport 1024: -j ACCEPT

#Log everything else below 1024
iptables -A INPUT -i ppp0 -p tcp -m limit --limit 1/s -j LOG --log-prefix
"DROPPED "
iptables -A INPUT -i ppp0 -p udp -m limit --limit 1/s -j LOG --log-prefix
"DROPPED "
iptables -A INPUT -i ppp0 -p icmp -m limit --limit 1/s -j LOG --log-prefix
"DROPPED "

#drop the rest with devious tcp reset
iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset
iptables -A INPUT -j DROP

#setup NAT
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE


#forward chain

#syn flood limiting
iptables -A FORWARD -p tcp --syn -m limit --limit 1/s -j ACCEPT
iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit
1/s -j ACCEPT


#enable ip forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward

echo "Starting IP Forwarding"


The symptoms:
	The linux box connects properly to my DSL service, and can see the windows
box on the local LAN (windows box can see the linux box aswell). I can
access services on the linux box such as ssh and http, but something is
preventing the windows box from seeing anything on the outside world via the
DSL. Any ideas/solutions?

		Cheers,
			Tyler

Tyler Kemp
----------
tylerk4@sbcglobal.net
tyler@strtok.co.uk
tylerk4@softhome.net



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

end of thread, other threads:[~2004-07-19  1:26 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-15 20:45 nat problem Rahul Jadhav
  -- strict thread matches above, loose matches on Subject: below --
2004-07-13 20:40 Frans Luteijn
2004-07-13 21:06 ` Antony Stone
2004-07-13 22:21   ` Frans Luteijn
2004-07-13 22:53     ` Antony Stone
2004-07-13 23:11       ` Nick Taylor
2004-07-14  1:02       ` Frans Luteijn
2004-07-14  8:53         ` Antony Stone
2004-07-14 23:30           ` Frans Luteijn
2004-07-15  8:21             ` Antony Stone
2004-07-19  1:26               ` Frans Luteijn
2004-07-05 16:33 Frans Luteijn
2004-07-07 13:07 ` Antony Stone
2003-10-06 12:30 NAT problem Jose Pascual
2003-10-06 13:19 ` Venkatesh. K
2003-10-06 13:33   ` Cedric Blancher
2003-10-06 20:38 ` Joel Newkirk
2002-11-22 22:52 nat problem Yogini Parkhi
2002-10-21 13:04 NAT problem saravanan sakthi
2002-10-21 15:15 ` Antony Stone
2002-10-20 23:20 NAT Problem Morgan
2002-06-24 11:11 Nat PROBLEM lcef
2002-06-24 13:34 ` Antony Stone
2002-06-15 22:14 Completely NAT an ISP: A practical possibility? Brian Capouch
2002-06-15 22:33 ` Antony Stone
2002-06-15 23:17   ` Nick Drage
2002-06-17  4:25     ` Sathi
2002-06-17 10:58       ` nat problem umar
2002-06-17 18:11         ` Antony Stone
2002-05-09  4:41 NAT problem Tyler Kemp
2002-06-13 16:03 ` 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.