Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SNAT on one networkcard with two ip's ??
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Mroofka
Guru
Guru


Joined: 25 Jan 2005
Posts: 369
Location: Poland

PostPosted: Thu Jan 05, 2006 11:01 am    Post subject: SNAT on one networkcard with two ip's ?? Reply with quote

Hi

I wonder if ther is chance to set the SNAT (I've public ip from my isp) on one netcard with two ip's?

eth0:1 192.168.0.1 - it is suposed to be gateway for my LAN

eth0 80.48.66.12 - it is my public ip

it should works but it doesn't

Code:
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -j SNAT --to 80.48.66.12


I know that this is usualy done on two interfaces but maby ther is any pasibility to make it on only one card witch will be quite nice for me becouse my LAN and internet connection are connected to the same switch. It's quit unclear but the real problem is only in first sentence :)

Pozdrawiam
_________________
"Make install not love"
registred linux User # 379143

"Ready for Anything; Prepared for everything; Surprised by Nothing !"
Back to top
View user's profile Send private message
jpl888
Guru
Guru


Joined: 13 Apr 2005
Posts: 337
Location: Piltown, Co. Kilkenny, Ireland.

PostPosted: Thu Jan 05, 2006 12:51 pm    Post subject: Reply with quote

I don't think that's a good setup.

Somebody may be able to correct me but you won't be able to firewall properly with both internal and external addresses on the same card, and I wouldn't rely on the firewall on the DSL modem/router as they are normally very basic.

Best thing to do is spend a few quid or find an old ethernet card then have internal network attached to one and external attached to the other then you can NAT and firewall till your hearts content.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum