LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-05-2006, 04:07 AM   #1
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 651

Rep: Reputation: 34
Warning: wierd character in interface `eth0:2' (No aliases, :, ! or *).


I want to forward all incomming and outgoings port 5223, 5223 to ro from server to external ip and I put entrys as


-A PREROUTING -d 203.143.24.xxx -i eth0:2 -p tcp -m tcp --dport 5222 -j DNAT --to-destination 192.168.11.15:5222
-A PREROUTING -d 203.143.24.xxx -i eth0:2 -p udp -m udp --dport 5222 -j DNAT --to-destination 192.168.11.15:5222
-A PREROUTING -d 203.143.24.xxx -i eth0:2 -p tcp -m tcp --dport 5223 -j DNAT --to-destination 192.168.11.15:5223
-A PREROUTING -d 203.143.24.xxx -i eth0:2 -p udp -m udp --dport 5223 -j DNAT --to-destination 192.168.11.15:5223
-A POSTROUTING -s 192.168.11.15 -j SNAT --to-source 203.143.24.xxx
-A POSTROUTING -s 192.168.11.155 -j SNAT --to-source 203.143.24.123
-A FORWARD -d 192.168.11.15 -i eth0:2 -p udp -m udp --dport 5222 -j ACCEPT
-A FORWARD -d 192.168.11.15 -i eth0:2 -p tcp -m tcp --dport 5222 -j ACCEPT
-A FORWARD -d 192.168.11.15 -i eth0:2 -p udp -m udp --dport 5223 -j ACCEPT
-A FORWARD -d 192.168.11.15 -i eth0:2 -p tcp -m tcp --dport 5223 -j ACCEPT

when I do

service iptables restart

I get this wornning


Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter nat [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: Warning: wierd character in interface `eth0:2' (No aliases, :, ! or *).
Warning: wierd character in interface `eth0:2' (No aliases, :, ! or *).
Warning: wierd character in interface `eth0:2' (No aliases, :, ! or *).
Warning: wierd character in interface `eth0:2' (No aliases, :, ! or *).
Warning: wierd character in interface `eth0:2' (No aliases, :, ! or *).
Warning: wierd character in interface `eth0:2' (No aliases, :, ! or *).
Warning: wierd character in interface `eth0:2' (No aliases, :, ! or *).
Warning: wierd character in interface `eth0:2' (No aliases, :, ! or *).
[ OK ]



can any body tell me why


thank you

Asanka
 
Old 04-05-2006, 10:35 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Iptables does not support virtual interfaces in either it's “-i” or “-o” command options.

I never had the need to do this, so the following suggestion is untested: You could try renaming the aliased interface (using ifrename, part of the wirelestool package) and use that name.

Like I said, never tried it and I don't even know if ifrename can handle aliased interfaces.

Hope it helps.
 
Old 04-05-2006, 05:27 PM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Moved: This thread is more suitable in Linux-Networking and has been moved accordingly to help your thread/question get the exposure it deserves.

iptables doesn't work well with aliases. That's a big limitation in some cases. However... in your case you can change eth0:2 to eth0 and leave it or add a filter rule for source (-s) filtering addresses that match eth0:2.
 
Old 04-06-2006, 01:23 AM   #4
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 651

Original Poster
Rep: Reputation: 34
Thanks Druuna
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
install character text interface bobby_hawk Slackware 1 02-12-2006 10:44 AM
Bringing up interface eth0 Delaying eth0 initialization. [ FA bansal_ashok Linux - Networking 4 05-27-2005 11:09 AM
Wierd error with ping WARNING: failed to install socket filter: Protocol not availabl abefroman Linux - Networking 4 03-25-2004 06:48 PM
Bringing up interface eth0: determining ip information for eth0... failed ralphethomas Linux - Networking 0 01-24-2004 06:33 PM
Problems with BIND operating with Windows XP with dns zones for eth0 aliases Cyclo Linux - Networking 2 01-16-2004 02:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration