wierd character in interface `eth0:1'

Discussion in 'Installation/Configuration' started by mirostz, Mar 6, 2009.

  1. mirostz

    mirostz New Member

    Hello guys,
    I am running openvpn and when i nat via eth0 it is working good.
    But when i try to change the outgoing ip which is at my second interface eth0:1 i get this error:

    # iptables -t nat -A POSTROUTING -s -o eth0:1 -j MASQUERADE
    Warning: wierd character in interface `eth0:1' (No aliases, :, ! or *).

    How can i make an alias or something to make it work. Please help
  2. falko

    falko Super Moderator ISPConfig Developer

    Can you put eth0:1 in quotation marks?
  3. mirostz

    mirostz New Member

    hello guys i find a way to do it and i will share it with you so maybe it will help to someone:

    eth0 75.x.x.1
    eth0:1 75.x.x.2

    locatel ip:

    all you have to do is just type:
    iptables -t nat -A POSTROUTING -s -o eth0 -j SNAT --to-source 75.x.x.2

    and your outgoing ip will be 75.x.x.2

    have fun
  4. mirostz

    mirostz New Member

    falko thanks for your reply but the answer is not you can just put "" i have tried it :)

Share This Page