Networking Forums

Networking Forums > Computer Networking > Linux Networking > IP forwarding without NAT

Reply
Thread Tools Display Modes

IP forwarding without NAT

 
 
balzano_1@yahoo.com
Guest
Posts: n/a

 
      09-16-2007, 10:09 PM
Hello,

I am trying to setup a traffic shaper using HTB on my network; the
thing is i don't want to use NAT because i want the same IP address
that was inputed on one side to be outputted on the other side, this
will make life easier for me as i don't need to alter the Firewall
rules to meet the NAT requirements.


192.168.1.24(HTTP req) 192.168.1.24(shaped HTTP
req)
---------------------------------->[Trafic
shaper]----------------------------------------------->[Firewall]----
>[Internet]

eth0
eth1 eth0
192.
192. 192.
168.
168. 168
1.
1. 1.
1
2 254

The diagram above is a basic representation of what i am trying to
do; the traffic shaper is only forwarding traffic between eth0 and
eth1 while maintaining the source IP address.

My question is, In order to achieve this do i need to enable IP
forwarding only and do some basic iptable entries like this:

# echo 1 > /proc/sys/net/ipv4/ip_forward
# iptables -F
# iptables -P INPUT ACCEPT
# iptables -P OUTPUT ACCEPT
# iptables -P FORWARD ACCEPT

In this scenario the client(s) will have their default gateway set to
the Traffic shaper 192.168.1.1, the Traffic shaper will have it's
default gateway set to the Firewall 192.168.1.254.

In short; i just wanted to know if anyone has tried this or if it is
possible for it to be done without the use of NAT.

Thanks for reading.

 
Reply With Quote
 
 
 
 
David Schwartz
Guest
Posts: n/a

 
      09-17-2007, 01:14 AM
On Sep 16, 3:09 pm, balzan...@yahoo.com wrote:
> In short; i just wanted to know if anyone has tried this or if it is
> possible for it to be done without the use of NAT.


It can be done with bridging and ebtables. Use the ebtables 'BROUTING'
table.

DS

 
Reply With Quote
 
balzano_1@yahoo.com
Guest
Posts: n/a

 
      09-17-2007, 07:25 AM
On 16 Sep, 23:09, balzan...@yahoo.com wrote:
> Hello,
>
> I am trying to setup a traffic shaper using HTB on my network; the
> thing is i don't want to use NAT because i want the same IP address
> that was inputed on one side to be outputted on the other side, this
> will make life easier for me as i don't need to alter the Firewall
> rules to meet the NAT requirements.
>
> 192.168.1.24(HTTP req) 192.168.1.24(shaped HTTP
> req)
> ---------------------------------->[Trafic
> shaper]----------------------------------------------->[Firewall]---->[Internet]
>
> eth0
> eth1 eth0
> 192.
> 192. 192.
> 168.
> 168. 168
> 1.
> 1. 1.
> 1
> 2 254
>
> The diagram above is a basic representation of what i am trying to
> do; the traffic shaper is only forwarding traffic between eth0 and
> eth1 while maintaining the source IP address.
>
> My question is, In order to achieve this do i need to enable IP
> forwarding only and do some basic iptable entries like this:
>
> # echo 1 > /proc/sys/net/ipv4/ip_forward
> # iptables -F
> # iptables -P INPUT ACCEPT
> # iptables -P OUTPUT ACCEPT
> # iptables -P FORWARD ACCEPT
>
> In this scenario the client(s) will have their default gateway set to
> the Traffic shaper 192.168.1.1, the Traffic shaper will have it's
> default gateway set to the Firewall 192.168.1.254.
>
> In short; i just wanted to know if anyone has tried this or if it is
> possible for it to be done without the use of NAT.
>
> Thanks for reading.


oops, the diagram didn't work out right; let me redraw it.

| 192.168.1.24(HTTP request)
|
|
|
| eth0 192.168.1.2
[Traffic shaper]
| eth1 192.168.1.3
|
|
| 192.168.1.24(Shaper HTTP request)
|
|
| eth0 192.168.1.254
[Firewall]
|
|


So 192.168.1.24 stays the same even after passing through the traffic
shaper.

And thanks David for the reply, i will look into ebtables.

 
Reply With Quote
 
 
 
Reply

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
Ip forwarding InuY4sha Linux Networking 9 01-08-2008 10:16 AM
IP forwarding manoj Linux Networking 16 02-28-2006 10:12 PM
X forwarding over ssh -- how? Robert Latest Linux Networking 2 07-15-2005 10:53 AM
IP forwarding on NT4 Andy Williams Windows Networking 11 12-22-2004 02:33 PM
ssh/scp forwarding ??? Ben Linux Networking 11 09-29-2004 08:51 PM



1 2 3 4 5 6 7 8 9 10 11