IP forwarding without NAT

This is a discussion on IP forwarding without NAT within the Linux Networking forums, part of the Linux Forums category; Hello, I am trying to setup a traffic shaper using HTB on my network; the thing is i don't ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-16-2007
balzano_1@yahoo.com
 
Posts: n/a
Default IP forwarding without NAT

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
  #2 (permalink)  
Old 09-17-2007
David Schwartz
 
Posts: n/a
Default Re: IP forwarding without NAT

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
  #3 (permalink)  
Old 09-17-2007
balzano_1@yahoo.com
 
Posts: n/a
Default Re: IP forwarding without NAT

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 Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:36 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0