View previous topic :: View next topic |
Author |
Message |
Mroofka Guru
Joined: 25 Jan 2005 Posts: 369 Location: Poland
|
Posted: Thu Jan 05, 2006 11:01 am Post subject: SNAT on one networkcard with two ip's ?? |
|
|
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 |
|
|
jpl888 Guru
Joined: 13 Apr 2005 Posts: 337 Location: Piltown, Co. Kilkenny, Ireland.
|
Posted: Thu Jan 05, 2006 12:51 pm Post subject: |
|
|
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 |
|
|
|